{"id":31482277,"url":"https://github.com/snowflake-labs/dbt_semantic_view","last_synced_at":"2025-10-02T07:45:04.031Z","repository":{"id":316321437,"uuid":"1054455135","full_name":"Snowflake-Labs/dbt_semantic_view","owner":"Snowflake-Labs","description":"The DBT package to support Snowflake Semantic View as a new materialization.","archived":false,"fork":false,"pushed_at":"2025-10-01T22:24:14.000Z","size":1011,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T22:24:50.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snowflake-Labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-10T21:34:26.000Z","updated_at":"2025-10-01T12:35:06.000Z","dependencies_parsed_at":"2025-09-29T18:19:30.847Z","dependency_job_id":null,"html_url":"https://github.com/Snowflake-Labs/dbt_semantic_view","commit_stats":null,"previous_names":["snowflake-labs/dbt_semantic_view"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Snowflake-Labs/dbt_semantic_view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflake-Labs%2Fdbt_semantic_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflake-Labs%2Fdbt_semantic_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflake-Labs%2Fdbt_semantic_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflake-Labs%2Fdbt_semantic_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snowflake-Labs","download_url":"https://codeload.github.com/Snowflake-Labs/dbt_semantic_view/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflake-Labs%2Fdbt_semantic_view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277974426,"owners_count":25908396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-02T07:45:02.980Z","updated_at":"2025-10-02T07:45:04.025Z","avatar_url":"https://github.com/Snowflake-Labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Snowflake Semantic View dbt Package\n\nProfessional dbt macros and integration tests for building, dropping, and renaming Snowflake Semantic Views. This package lets you materialize Semantic Views via dbt and reference them from downstream models.\n\n### At a glance\n- **Materialization**: `semantic_view`\n- **Warehouse**: Snowflake\n- **dbt Compatibility**: dbt 1.x\n\n### Quickstart\nFollow these steps on macOS/Linux with Python 3 installed. No prior dbt installation is required.\n\n1) Clone and enter the repo\n```\ngit clone https://github.com/Snowflake-Labs/dbt-snowflake-semantic-view.git\ncd dbt-snowflake-semantic-view\n```\n\n2) Create an isolated Python environment and install dependencies\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -U pip\npip install dbt-snowflake\n```\n\n3) Configure Snowflake credentials (env vars)\nSet the following environment variables for the integration profile. For username/password auth use `SNOWFLAKE_TEST_AUTHENTICATOR=snowflake`.\n```\nexport SNOWFLAKE_TEST_ACCOUNT=\u003caccount\u003e\nexport SNOWFLAKE_TEST_USER=\u003cuser\u003e\nexport SNOWFLAKE_TEST_PASSWORD=\u003cpassword\u003e\nexport SNOWFLAKE_TEST_AUTHENTICATOR=\u003cauthenticator\u003e   # e.g. snowflake | externalbrowser\nexport SNOWFLAKE_TEST_ROLE=\u003crole\u003e\nexport SNOWFLAKE_TEST_DATABASE=\u003cdatabase\u003e\nexport SNOWFLAKE_TEST_WAREHOUSE=\u003cwarehouse\u003e\nexport SNOWFLAKE_TEST_SCHEMA=\u003cschema\u003e\n```\n\n4) Run integration tests\n```\ncd integration_tests/\ndbt deps --target snowflake\ndbt build --target snowflake\n```\n\n### Usage in your dbt project\nAdd to `packages.yml`:\n```\npackages:\n  - package: Snowflake-Labs/dbt_semantic_view\n```\n\nCreate a model using the Semantic View materialization:\n```\n{{ config(materialized='semantic_view') }}\nTABLES(\n  {{ source('\u003csource_name\u003e', '\u003ctable_name\u003e') }},\n  {{ ref('\u003canother_model\u003e') }}\n)\n[ RELATIONSHIPS ( relationshipDef [ , ... ] ) ]\n[ FACTS ( semanticExpression [ , ... ] ) ]\n[ DIMENSIONS ( semanticExpression [ , ... ] ) ]\n[ METRICS ( semanticExpression [ , ... ] ) ]\n[ COMMENT = '\u003ccomment\u003e' ]\n[ COPY GRANTS ]\n```\n\nReference a Semantic View from another model:\n```\n{{ config(materialized='table') }}\nselect *\nfrom semantic_view(\n  {{ ref('\u003csemantic_view_model\u003e') }}\n  [ { METRICS \u003cmetric\u003e | FACTS \u003cfact_expr\u003e } ]\n  [ DIMENSIONS \u003cdimension_expr\u003e ]\n  [ WHERE \u003cpredicate\u003e ]\n)\n```\n\n### Development\n- Python 3.9+ recommended\n- Use a venv: `python3 -m venv .venv \u0026\u0026 source .venv/bin/activate`\n- Install tooling as needed: `pip install dbt-snowflake`\n\n### Contributing\nWe welcome issues and PRs! Please:\n- Open an issue to discuss significant changes\n- Keep edits focused and include tests where possible\n- Follow dbt and Python best practices\n\n### License\nApache License 2.0. See `LICENSE` for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowflake-labs%2Fdbt_semantic_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowflake-labs%2Fdbt_semantic_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowflake-labs%2Fdbt_semantic_view/lists"}