generated from infinitelambda/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dbt_project.yml
46 lines (40 loc) · 2.53 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
name: 'data_diff'
config-version: 2
require-dbt-version: [">=1.6.0", "<2.0.0"]
model-paths: ["models"]
macro-paths: ["macros"]
clean-targets:
- "target"
- "dbt_packages"
- "logs"
vars:
# data_diff__database: COMMON # This will be passed through `generate_database_name` macro
# data_diff__schema: DATA_DIFF # This will be passed through `generate_schema_name` macro
data_diff__on_migration: false # Enable to deploy the package's resources e.g. stored proc, take precedence to `data_diff__on_migration_data`
data_diff__on_migration_data: false # Enable to refresh the list of tables configured for the validation
data_diff__on_run_hook: false # Enable to run data diff's hook
# data_diff__full_refresh: false # Enable to re-create the data-diff models whose the native dbt `full-refresh` option is currently disabled
data_diff__configured_tables__source_fixed_naming: true # Set false to let (only) source db & schema naming follow the configured one in dbt
data_diff__configured_tables__target_fixed_naming: true # Set false to let (only) target db & schema naming follow the configured one in dbt
# data_diff__configured_tables:
# - src_db: src_db # optional, empty to get target.database
# src_schema: src_schema # optional, empty to get target.schema
# src_table: table1 # mandatory
# trg_db: trg_db # optional, empty to get target.database
# trg_schema: trg_schema # optional, empty to get target.schema
# trg_table: table1 # optional, empty to get src_table
# pk: key # mandatory, multiple columns splitted by comma e.g. key1,key2
# include_columns: [] # optional, [] to include all
# exclude_columns: ["timestamp"] # optional, [] to exclude nothing
# where: "1=1" # optional, 1=1 by default
# pipe_name: '' # in non-async mode, it must be empty if specified
# # in async mode, it can be any value e.g. "1", "batch_dat", "batch_milan"
data_diff__auto_pipe: false # Set true & re-run migration to auto-set `pipe_name` config if it's not specified: Each compared entity will be set in a single thread
on-run-end:
- > # migration hook
{% if var("data_diff__on_migration", false) %}
{{ data_diff.create_resources() }}
{% if execute and var("data_diff__on_migration_data", true) %}
{{ data_diff.refresh_resource_data() }}
{% endif %}
{% endif %}