{"id":23886033,"url":"https://github.com/dpguthrie/snowflake-dbt-demo-project","last_synced_at":"2025-08-28T16:43:45.431Z","repository":{"id":38320056,"uuid":"477126378","full_name":"dpguthrie/snowflake-dbt-demo-project","owner":"dpguthrie","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-12T12:17:06.000Z","size":5882,"stargazers_count":22,"open_issues_count":19,"forks_count":22,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T03:05:06.441Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpguthrie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-02T17:34:02.000Z","updated_at":"2025-01-21T05:53:28.000Z","dependencies_parsed_at":"2023-02-14T14:30:53.927Z","dependency_job_id":null,"html_url":"https://github.com/dpguthrie/snowflake-dbt-demo-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpguthrie%2Fsnowflake-dbt-demo-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpguthrie%2Fsnowflake-dbt-demo-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpguthrie%2Fsnowflake-dbt-demo-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpguthrie%2Fsnowflake-dbt-demo-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpguthrie","download_url":"https://codeload.github.com/dpguthrie/snowflake-dbt-demo-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138745,"owners_count":21053940,"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","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-01-04T05:56:32.813Z","updated_at":"2025-04-10T01:23:50.632Z","avatar_url":"https://github.com/dpguthrie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Welcome to the dbt Labs demo dbt project! We use the [TPCH dataset](https://docs.snowflake.com/en/user-guide/sample-data-tpch.html) to create a sample project to emulate what a production project might look like!\n\n                        _              __                   \n       ____ ___  ____ _(_)___     ____/ /__  ____ ___  ____ \n      / __ `__ \\/ __ `/ / __ \\   / __  / _ \\/ __ `__ \\/ __ \\\n     / / / / / / /_/ / / / / /  / /_/ /  __/ / / / / / /_/ /\n    /_/ /_/ /_/\\__,_/_/_/ /_/   \\__,_/\\___/_/ /_/ /_/\\____/ \n\n## Special demos\n\n- **dbt-external-tables:** Manage database objects that read data external to the warehouse within dbt. See `models/demo_examples/external_sources.yml`.\n- **Lifecycle Notifications:** See examples of dbt Cloud Job Lifecycle Notifications [here](https://gist.github.com/boxysean/3166b3ac55801685b6d275e9a9ddd5ee).\n- **Pivot tables:** One example of creating a pivot table using Snowflake syntax, another example using Jinja. See `models/aggregates/agg_yearly_*.sql`.\n\n## Codegen Examples\n\nThe codegen package can be run via the IDE, by clicking the \"Compile\" button, or in the command line.\n\n### Command Line\n\nThe example below shows how we can generate yml for a particular source:\n\n```bash\ndbt run-operation generate_source --args '{\"schema_name\": \"tpch_sf001\", \"database_name\": \"raw\", \"generate_columns\": \"true\", \"include_descriptions\": \"true\"}'\n```\n\n### IDE\n\nPaste in the snippets below in your IDE and click \"Compile\".\n\n### codegen.generate_source\n\nGenerates lightweight YAML for a Source\n```sql\n{{\n    codegen.generate_source(\n        schema_name='tpch_sf001',\n        database_name='raw',\n        generate_columns='true',\n        include_descriptions='true',\n    )\n}}\n```\n\n### codegen.generate_base_model\n\nGenerates SQL for a staging model\n```sql\n{{\n    codegen.generate_base_model(\n        source_name='tpch',\n        table_name='orders',\n    )\n}}\n```\n\n### codegen.generate_model_yaml\n\nGenerates the YAML for a given model\n```sql\n{{ \n    codegen.generate_model_yaml(\n        model_name='stg_tpch_orders'\n    )\n}}\n```\n\nGenerates the YAML for multiple models\n```sql\n{{ \n    generate_models_yaml(\n        model_names=[\n            'stg_tpch_orders',\n            'stg_tpch_parts',\n            'stg_tpch_regions',\n        ]\n    )\n}}\n```\n\nchange","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpguthrie%2Fsnowflake-dbt-demo-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpguthrie%2Fsnowflake-dbt-demo-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpguthrie%2Fsnowflake-dbt-demo-project/lists"}