This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
dbt_project.yml
71 lines (64 loc) · 3.79 KB
/
dbt_project.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Rename this project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: 'my_snowflake_dbt_project'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
# In dbt Cloud IDE, this field is unused.
profile: 'snowflake_demo_project'
# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You don't need to change these for this project.
source-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
data-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
# on-run-start and on-run-end are SQL statement(s) or macros that run at the end of
# dbt run/dbt/seed/dbt snapshot commands.
# Full documentation: https://docs.getdbt.com/reference/project-configs/on-run-start-on-run-end
on-run-end:
- "{{ grant_all_on_schemas(schemas, 'public') }}"
# Configuring seeds
# Full documentation: https://docs.getdbt.com/docs/building-a-dbt-project/seeds
seeds:
# This declares that column names in the seed file will not be quoted when the table is created.
+quote_columns: false
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
# In this config, we tell dbt how to build the models, where to build them, which warehouse
# to use, and what query tag to provide on the snowflake site.
# These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
my_snowflake_dbt_project:
# When you rename the project up top, remember to rename it here too.
staging:
# Applies to all files under models/staging
+materialized: view
# This defaults every model in the staging directory to be materialized as a view in Snowflake. To learn more about materializations: https://docs.getdbt.com/docs/building-a-dbt-project/building-models/materializations
schema: staging
# This configuration builds every model in the staging directory into a schema named staging_<target_schema>
# learn more about custom schemas: https://docs.getdbt.com/docs/building-a-dbt-project/building-models/using-custom-schemas
query_tag: dbt_staging
# This applies a query tag named `dbt_staging` to any related queries in Snowflake's Query_History
# learn more about query tags: https://docs.getdbt.com/reference/resource-configs/snowflake-configs#query-tags
snowflake_warehouse: compute_wh
# This specifies which Snowflake warehouse should be used to execute models in staging by overriding the default warehouse defined in the connection.
# learn more about configuring warehouses: https://docs.getdbt.com/reference/resource-configs/snowflake-configs#configuring-virtual-warehouses
tags: "daily"
# You can apply tags to models, snapshots, seeds. This allows you to run based on the tag such as `dbt run --model tag:daily` which would let you run all the models tagged "daily"
# learn more about tags: https://docs.getdbt.com/reference/resource-configs/tags#definition
marts:
core:
# Applies to all files under models/marts/core
+materialized: table
# This defaults every model in the marts/core directory to be materialized as a table in Snowflake
query_tag: dbt_marts
# This applies a query tag named `dbt_marts` to any related queries in Snowflake's Query_History