diff --git a/core/dbt/config/project.py b/core/dbt/config/project.py index 7203d45b055..184c2629397 100644 --- a/core/dbt/config/project.py +++ b/core/dbt/config/project.py @@ -651,7 +651,7 @@ def as_v1(self): # remove this from the v1 form mutated.pop('vars') # ok, now we want to look through all the existing cfgkeys and mirror - # it, except anything under 'config' gets included directly. + # it, except expand the '+' prefix. for cfgkey in common_config_keys: if cfgkey not in dct: continue @@ -666,11 +666,10 @@ def as_v1(self): def _flatten_config(dct: Dict[str, Any]): result = {} for key, value in dct.items(): - if isinstance(value, dict): - if key == 'config': - result.update(value) - else: - result[key] = _flatten_config(value) + if isinstance(value, dict) and not key.startswith('+'): + result[key] = _flatten_config(value) else: + if key.startswith('+'): + key = key[1:] result[key] = value return result diff --git a/core/dbt/config/runtime.py b/core/dbt/config/runtime.py index e686681075f..fd501bdf0b3 100644 --- a/core/dbt/config/runtime.py +++ b/core/dbt/config/runtime.py @@ -228,12 +228,10 @@ def _get_v2_config_paths( paths: MutableSet[FQNPath], ) -> PathSet: for key, value in config.items(): - if isinstance(value, dict): - if key == 'config': - paths.add(path) - else: - self._get_v2_config_paths(value, path + (key,), paths) - + if isinstance(value, dict) and not key.startswith('+'): + self._get_v2_config_paths(value, path + (key,), paths) + else: + paths.add(path) return frozenset(paths) def _get_v1_config_paths( diff --git a/core/dbt/context/context_config.py b/core/dbt/context/context_config.py index c9b8dbf3b3a..3bf5e039d4a 100644 --- a/core/dbt/context/context_config.py +++ b/core/dbt/context/context_config.py @@ -114,12 +114,14 @@ def project_configs( else: model_configs = project.models for level_config in fqn_search(model_configs, fqn): - if 'config' not in level_config: - continue - - level_value = level_config['config'] - if isinstance(level_value, dict): - yield deepcopy(level_value) + result = {} + for key, value in level_config.items(): + if key.startswith('+'): + result[key[1:]] = deepcopy(value) + elif not isinstance(value, dict): + result[key] = deepcopy(value) + + yield result def active_project_configs( self, fqn: List[str], resource_type: NodeType diff --git a/core/dbt/utils.py b/core/dbt/utils.py index 20a72b10bb3..b2cb02a5a5e 100644 --- a/core/dbt/utils.py +++ b/core/dbt/utils.py @@ -540,15 +540,15 @@ def executor(config: HasThreadingConfig) -> concurrent.futures.Executor: def fqn_search( root: Dict[str, Any], fqn: List[str] -) -> Iterator[Any]: +) -> Iterator[Dict[str, Any]]: """Iterate into a nested dictionary, looking for keys in the fqn as levels. - Yield level name, level config pairs. + Yield the level config. """ yield root for level in fqn: level_config = root.get(level, None) - if level_config is None: + if not isinstance(level_config, dict): break yield copy.deepcopy(level_config) root = level_config diff --git a/test/integration/001_simple_copy_test/test_simple_copy.py b/test/integration/001_simple_copy_test/test_simple_copy.py index bf27171e236..0705fbba93f 100644 --- a/test/integration/001_simple_copy_test/test_simple_copy.py +++ b/test/integration/001_simple_copy_test/test_simple_copy.py @@ -28,9 +28,7 @@ def seed_quote_cfg_with(self, extra): cfg = { 'config-version': 2, 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } cfg.update(extra) @@ -112,9 +110,7 @@ def test__snowflake__simple_copy(self): self.use_default_project({ "data-paths": [self.dir("seed-initial")], "seeds": { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } }) results = self.run_dbt(["seed"]) @@ -328,9 +324,7 @@ def test__snowflake__incremental_overwrite(self): # Setting the incremental_strategy should make this succeed self.use_default_project({ "models": { - 'config': { - "incremental_strategy": "delete+insert" - }, + "incremental_strategy": "delete+insert" }, "data-paths": [self.dir("snowflake-seed-update")], }) diff --git a/test/integration/004_simple_snapshot_test/test_simple_snapshot.py b/test/integration/004_simple_snapshot_test/test_simple_snapshot.py index 3a3215c1e0f..290f38d9a44 100644 --- a/test/integration/004_simple_snapshot_test/test_simple_snapshot.py +++ b/test/integration/004_simple_snapshot_test/test_simple_snapshot.py @@ -114,9 +114,7 @@ def project_config(self): 'macro-paths': ['custom-snapshot-macros', 'macros'], 'snapshot-paths': ['test-snapshots-checkall'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } @@ -316,12 +314,10 @@ def project_config(self): "snapshot-paths": ['test-snapshots-select-noconfig'], "snapshots": { "test": { - "config": { - "target_schema": self.unique_schema(), - "unique_key": "id || '-' || first_name", - 'strategy': 'timestamp', - 'updated_at': 'updated_at', - }, + "target_schema": self.unique_schema(), + "unique_key": "id || '-' || first_name", + 'strategy': 'timestamp', + 'updated_at': 'updated_at', }, }, 'macro-paths': ['macros'], @@ -561,12 +557,10 @@ def project_config(self): "snapshot-paths": ['test-check-col-snapshots-noconfig'], "snapshots": { "test": { - "config": { - "target_schema": self.unique_schema(), - "unique_key": "id || '-' || first_name", - "strategy": "check", - "check_cols": ["email"], - }, + "target_schema": self.unique_schema(), + "unique_key": "id || '-' || first_name", + "strategy": "check", + "check_cols": ["email"], }, }, 'macro-paths': ['macros'], diff --git a/test/integration/005_simple_seed_test/test_seed_type_override.py b/test/integration/005_simple_seed_test/test_seed_type_override.py index ab27566134a..a6cfd372f4a 100644 --- a/test/integration/005_simple_seed_test/test_seed_type_override.py +++ b/test/integration/005_simple_seed_test/test_seed_type_override.py @@ -15,21 +15,15 @@ def project_config(self): 'macro-paths': ['macros'], 'seeds': { 'test': { - 'config': { - 'enabled': False, - 'quote_columns': True, - }, + 'enabled': False, + 'quote_columns': True, 'seed_enabled': { - 'config': { - 'enabled': True, - 'column_types': self.seed_enabled_types() - }, + 'enabled': True, + '+column_types': self.seed_enabled_types() }, 'seed_tricky': { - 'config': { - 'enabled': True, - 'column_types': self.seed_tricky_types(), - }, + 'enabled': True, + '+column_types': self.seed_tricky_types(), }, }, }, diff --git a/test/integration/005_simple_seed_test/test_simple_seed.py b/test/integration/005_simple_seed_test/test_simple_seed.py index 2f74087d733..f1c3cd67817 100644 --- a/test/integration/005_simple_seed_test/test_simple_seed.py +++ b/test/integration/005_simple_seed_test/test_simple_seed.py @@ -24,9 +24,7 @@ def project_config(self): 'config-version': 2, "data-paths": ['data'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } @@ -73,10 +71,8 @@ def project_config(self): 'config-version': 2, "data-paths": ['data'], 'seeds': { - 'config': { - "schema": "custom_schema", - 'quote_columns': False, - }, + "schema": "custom_schema", + 'quote_columns': False, }, } @@ -126,19 +122,13 @@ def project_config(self): 'seeds': { "test": { "seed_enabled": { - 'config': { - "enabled": True - }, + "enabled": True }, "seed_disabled": { - 'config': { - "enabled": False - }, + "enabled": False } }, - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -185,9 +175,7 @@ def project_config(self): 'config-version': 2, "data-paths": ['data-bad'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -220,9 +208,7 @@ def project_config(self): 'config-version': 2, "data-paths": ['data-bom'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -254,9 +240,7 @@ def project_config(self): 'config-version': 2, "data-paths": ['data-unicode'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } diff --git a/test/integration/006_simple_dependency_test/test_local_dependency.py b/test/integration/006_simple_dependency_test/test_local_dependency.py index ec1def2b199..62a103bd71f 100644 --- a/test/integration/006_simple_dependency_test/test_local_dependency.py +++ b/test/integration/006_simple_dependency_test/test_local_dependency.py @@ -129,14 +129,10 @@ def project_config(self): 'config-version': 2, 'macro-paths': ['schema_override_macros'], 'models': { - 'config': { - 'schema': 'dbt_test', - }, + 'schema': 'dbt_test', }, 'seeds': { - 'config': { - 'schema': 'dbt_test', - }, + 'schema': 'dbt_test', } } diff --git a/test/integration/007_graph_selection_tests/test_tag_selection.py b/test/integration/007_graph_selection_tests/test_tag_selection.py index 0edee7032f8..1925e281aaa 100644 --- a/test/integration/007_graph_selection_tests/test_tag_selection.py +++ b/test/integration/007_graph_selection_tests/test_tag_selection.py @@ -18,14 +18,10 @@ def project_config(self): "models": { "test": { "users": { - 'config': { - "tags": "specified_as_string" - }, + "tags": "specified_as_string" }, "users_rollup": { - 'config': { - "tags": ["specified_in_project"], - }, + "tags": ["specified_in_project"], } } } diff --git a/test/integration/014_hook_tests/test_model_hooks.py b/test/integration/014_hook_tests/test_model_hooks.py index 232b87b8ea1..9adb74a65ac 100644 --- a/test/integration/014_hook_tests/test_model_hooks.py +++ b/test/integration/014_hook_tests/test_model_hooks.py @@ -124,22 +124,20 @@ def project_config(self): 'macro-paths': ['macros'], 'models': { 'test': { - 'config': { - 'pre-hook': [ - # inside transaction (runs second) - MODEL_PRE_HOOK, - - # outside transaction (runs first) - {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, - ], - 'post-hook':[ - # outside transaction (runs second) - {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, - - # inside transaction (runs first) - MODEL_POST_HOOK, - ], - }, + 'pre-hook': [ + # inside transaction (runs second) + MODEL_PRE_HOOK, + + # outside transaction (runs first) + {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, + ], + 'post-hook':[ + # outside transaction (runs second) + {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, + + # inside transaction (runs first) + MODEL_POST_HOOK, + ], } } } @@ -164,23 +162,21 @@ def project_config(self): 'models': { 'test': { 'hooked': { - 'config': { - 'post-hook': [''' - insert into {{this.schema}}.on_model_hook select - state, - '{{ target.dbname }}' as "target.dbname", - '{{ target.host }}' as "target.host", - '{{ target.name }}' as "target.name", - '{{ target.schema }}' as "target.schema", - '{{ target.type }}' as "target.type", - '{{ target.user }}' as "target.user", - '{{ target.get("pass", "") }}' as "target.pass", - {{ target.port }} as "target.port", - {{ target.threads }} as "target.threads", - '{{ run_started_at }}' as "run_started_at", - '{{ invocation_id }}' as "invocation_id" - from {{ ref('post') }}'''.strip()], - }, + 'post-hook': [''' + insert into {{this.schema}}.on_model_hook select + state, + '{{ target.dbname }}' as "target.dbname", + '{{ target.host }}' as "target.host", + '{{ target.name }}' as "target.name", + '{{ target.schema }}' as "target.schema", + '{{ target.type }}' as "target.type", + '{{ target.user }}' as "target.user", + '{{ target.get("pass", "") }}' as "target.pass", + {{ target.port }} as "target.port", + {{ target.threads }} as "target.threads", + '{{ run_started_at }}' as "run_started_at", + '{{ invocation_id }}' as "invocation_id" + from {{ ref('post') }}'''.strip()], } }, } @@ -214,13 +210,11 @@ def project_config(self): 'data-paths': ['data'], 'models': {}, 'seeds': { - 'config': { - 'post-hook': [ - 'alter table {{ this }} add column new_col int', - 'update {{ this }} set new_col = 1' - ], - 'quote_columns': False, - } + 'post-hook': [ + 'alter table {{ this }} add column new_col int', + 'update {{ this }} set new_col = 1' + ], + 'quote_columns': False, }, } @@ -249,17 +243,13 @@ def project_config(self): 'snapshot-paths': ['test-snapshots'], 'models': {}, 'snapshots': { - 'config': { - 'post-hook': [ - 'alter table {{ this }} add column new_col int', - 'update {{ this }} set new_col = 1' - ] - }, + 'post-hook': [ + 'alter table {{ this }} add column new_col int', + 'update {{ this }} set new_col = 1' + ] }, 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -297,20 +287,18 @@ def test_postgres_pre_and_post_model_hooks_model_and_project(self): 'config-version': 2, 'models': { 'test': { - 'config': { - 'pre-hook': [ - # inside transaction (runs second) - MODEL_PRE_HOOK, - # outside transaction (runs first) - {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, - ], - 'post-hook':[ - # outside transaction (runs second) - {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, - # inside transaction (runs first) - MODEL_POST_HOOK, - ] - }, + 'pre-hook': [ + # inside transaction (runs second) + MODEL_PRE_HOOK, + # outside transaction (runs first) + {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, + ], + 'post-hook':[ + # outside transaction (runs second) + {"sql": "vacuum {{ this.schema }}.on_model_hook", "transaction": False}, + # inside transaction (runs first) + MODEL_POST_HOOK, + ], } } }) @@ -339,9 +327,7 @@ def project_config(self): 'snapshot-paths': ['test-kwargs-snapshots'], 'models': {}, 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/014_hook_tests/test_model_hooks_bq.py b/test/integration/014_hook_tests/test_model_hooks_bq.py index 931d5fd351d..581b48872af 100644 --- a/test/integration/014_hook_tests/test_model_hooks_bq.py +++ b/test/integration/014_hook_tests/test_model_hooks_bq.py @@ -73,10 +73,8 @@ def project_config(self): 'macro-paths': ['macros'], 'models': { 'test': { - 'config': { - 'pre-hook': [MODEL_PRE_HOOK], - 'post-hook':[MODEL_POST_HOOK], - }, + 'pre-hook': [MODEL_PRE_HOOK], + 'post-hook':[MODEL_POST_HOOK], } } } @@ -131,12 +129,10 @@ def project_config(self): 'data-paths': ['data'], 'models': {}, 'seeds': { - 'config': { - 'post-hook': [ - 'insert into {{ this }} (a, b, c) VALUES (10, 11, 12)', - ], - 'quote_columns': False, - }, + 'post-hook': [ + 'insert into {{ this }} (a, b, c) VALUES (10, 11, 12)', + ], + 'quote_columns': False, }, } diff --git a/test/integration/014_hook_tests/test_run_hooks.py b/test/integration/014_hook_tests/test_run_hooks.py index 120a86e4ce1..e613e0644d3 100644 --- a/test/integration/014_hook_tests/test_run_hooks.py +++ b/test/integration/014_hook_tests/test_run_hooks.py @@ -52,9 +52,7 @@ def project_config(self): "insert into {{ target.schema }}.db_schemas (db, schema) values {% for db, schema in database_schemas %}('{{ db }}', '{{ schema }}' ){% if not loop.last %},{% endif %}{% endfor %}", ], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/014_hook_tests/test_run_hooks_bq.py b/test/integration/014_hook_tests/test_run_hooks_bq.py index 943f5fbfc53..e0edbde1af4 100644 --- a/test/integration/014_hook_tests/test_run_hooks_bq.py +++ b/test/integration/014_hook_tests/test_run_hooks_bq.py @@ -50,9 +50,7 @@ def project_config(self): "drop table {{ target.schema }}.end_hook_order_test", ], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/017_runtime_materialization_tests/test_runtime_materialization.py b/test/integration/017_runtime_materialization_tests/test_runtime_materialization.py index 5860b4a4210..2e3ba9c1af4 100644 --- a/test/integration/017_runtime_materialization_tests/test_runtime_materialization.py +++ b/test/integration/017_runtime_materialization_tests/test_runtime_materialization.py @@ -13,9 +13,7 @@ def project_config(self): 'config-version': 2, 'data-paths': ['data'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } diff --git a/test/integration/022_bigquery_test/test_bigquery_date_partitioning.py b/test/integration/022_bigquery_test/test_bigquery_date_partitioning.py index 4d86837fbbf..ae7781ef1a8 100644 --- a/test/integration/022_bigquery_test/test_bigquery_date_partitioning.py +++ b/test/integration/022_bigquery_test/test_bigquery_date_partitioning.py @@ -24,13 +24,12 @@ def project_config(self): models: test: partitioned_noconfig: - config: - materialized: table - partitions: - - 20180101 - - 20180102 - - 20180103 - verbose: true + materialized: table + partitions: + - 20180101 + - 20180102 + - 20180103 + verbose: true ''')) @use_profile('bigquery') diff --git a/test/integration/022_bigquery_test/test_simple_bigquery_view.py b/test/integration/022_bigquery_test/test_simple_bigquery_view.py index 376bc325ccb..b4869e2bfa2 100644 --- a/test/integration/022_bigquery_test/test_simple_bigquery_view.py +++ b/test/integration/022_bigquery_test/test_simple_bigquery_view.py @@ -20,9 +20,7 @@ def project_config(self): 'data-paths': ['data'], 'macro-paths': ['macros'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/023_exit_codes_test/test_exit_codes.py b/test/integration/023_exit_codes_test/test_exit_codes.py index b4d22de0479..4186a32b0e7 100644 --- a/test/integration/023_exit_codes_test/test_exit_codes.py +++ b/test/integration/023_exit_codes_test/test_exit_codes.py @@ -161,9 +161,7 @@ def project_config(self): 'config-version': 2, 'data-paths': ['data-good'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -189,9 +187,7 @@ def project_config(self): 'config-version': 2, 'data-paths': ['data-bad'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/024_custom_schema_test/test_custom_schema.py b/test/integration/024_custom_schema_test/test_custom_schema.py index decc8dd9b25..065c2fb84d6 100644 --- a/test/integration/024_custom_schema_test/test_custom_schema.py +++ b/test/integration/024_custom_schema_test/test_custom_schema.py @@ -62,9 +62,7 @@ def project_config(self): return { 'config-version': 2, "models": { - 'config': { - "schema": "dbt_test" - }, + "schema": "dbt_test" }, } @@ -100,9 +98,7 @@ def project_config(self): return { 'config-version': 2, "models": { - 'config': { - "schema": "dbt_test" - }, + "schema": "dbt_test" } } @@ -159,9 +155,7 @@ def project_config(self): 'config-version': 2, 'macro-paths': ['custom-macros'], 'models': { - 'config': { - 'schema': 'dbt_test', - }, + 'schema': 'dbt_test', } } @@ -190,9 +184,7 @@ def project_config(self): 'config-version': 2, 'macro-paths': ['custom-macros-configs'], 'models': { - 'config': { - 'schema': 'dbt_test' - }, + 'schema': 'dbt_test' }, } diff --git a/test/integration/025_duplicate_model_test/local_dependency/dbt_project.yml b/test/integration/025_duplicate_model_test/local_dependency/dbt_project.yml new file mode 100644 index 00000000000..64bd0728d3f --- /dev/null +++ b/test/integration/025_duplicate_model_test/local_dependency/dbt_project.yml @@ -0,0 +1,10 @@ +name: 'local_dep' +version: '1.0' +config-version: 2 + +profile: 'default' + +source-paths: ["models"] + +seeds: + quote_columns: False diff --git a/test/integration/025_duplicate_model_test/local_dependency/models/table_model.sql b/test/integration/025_duplicate_model_test/local_dependency/models/table_model.sql new file mode 100644 index 00000000000..43258a71464 --- /dev/null +++ b/test/integration/025_duplicate_model_test/local_dependency/models/table_model.sql @@ -0,0 +1 @@ +select 1 as id diff --git a/test/integration/025_duplicate_model_test/test_duplicate_model.py b/test/integration/025_duplicate_model_test/test_duplicate_model.py index 225df75f3df..42dad92dfc0 100644 --- a/test/integration/025_duplicate_model_test/test_duplicate_model.py +++ b/test/integration/025_duplicate_model_test/test_duplicate_model.py @@ -111,11 +111,9 @@ def packages_config(self): return { "packages": [ { - 'git': 'https://github.com/fishtown-analytics/dbt-integration-project', - 'revision': 'master', - 'warn-unpinned': False, - }, - ], + 'local': 'local_dependency' + } + ] } @use_profile("postgres") @@ -148,11 +146,9 @@ def packages_config(self): return { "packages": [ { - 'git': 'https://github.com/fishtown-analytics/dbt-integration-project', - 'revision': 'master', - 'warn-unpinned': False, - }, - ], + 'local': 'local_dependency' + } + ] } @use_profile("postgres") diff --git a/test/integration/026_aliases_test/test_aliases.py b/test/integration/026_aliases_test/test_aliases.py index fbb329c6db4..0eb06e8588b 100644 --- a/test/integration/026_aliases_test/test_aliases.py +++ b/test/integration/026_aliases_test/test_aliases.py @@ -18,14 +18,10 @@ def project_config(self): "models": { "test": { "alias_in_project": { - 'config': { - "alias": 'project_alias', - }, + "alias": 'project_alias', }, "alias_in_project_with_override": { - 'config': { - "alias": 'project_alias', - }, + "alias": 'project_alias', }, } } diff --git a/test/integration/029_docs_generate_tests/test_docs_generate.py b/test/integration/029_docs_generate_tests/test_docs_generate.py index 6229c016ff8..609ca38e300 100644 --- a/test/integration/029_docs_generate_tests/test_docs_generate.py +++ b/test/integration/029_docs_generate_tests/test_docs_generate.py @@ -137,9 +137,7 @@ def run_and_generate(self, extra=None, seed_count=1, model_count=1, alternate_db 'alternate_db': alternate_db, }, 'seeds': { - 'config': { - 'quote_columns': True, - }, + 'quote_columns': True, }, } if extra: diff --git a/test/integration/030_statement_test/test_statements.py b/test/integration/030_statement_test/test_statements.py index a77a1fb45d5..a410cd86ab2 100644 --- a/test/integration/030_statement_test/test_statements.py +++ b/test/integration/030_statement_test/test_statements.py @@ -20,9 +20,7 @@ def project_config(self): return { 'config-version': 2, 'seeds': { - 'config': { - 'quote_columns': False, - } + 'quote_columns': False, } } @@ -79,9 +77,7 @@ def project_config(self): return { 'config-version': 2, 'seeds': { - 'config': { - 'quote_columns': False, - } + 'quote_columns': False, } } diff --git a/test/integration/033_event_tracking_test/test_events.py b/test/integration/033_event_tracking_test/test_events.py index 48cdf301be4..acb3312333c 100644 --- a/test/integration/033_event_tracking_test/test_events.py +++ b/test/integration/033_event_tracking_test/test_events.py @@ -189,9 +189,7 @@ def project_config(self): "data-paths": [self.dir("data")], "test-paths": [self.dir("test")], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } diff --git a/test/integration/034_redshift_test/test_late_binding_view.py b/test/integration/034_redshift_test/test_late_binding_view.py index 656e1c2d801..5f7816e00e9 100644 --- a/test/integration/034_redshift_test/test_late_binding_view.py +++ b/test/integration/034_redshift_test/test_late_binding_view.py @@ -22,9 +22,7 @@ def project_config(self): 'config-version': 2, 'data-paths': [self.dir('seed')], 'seeds': { - 'config': { - 'quote_columns': False, - } + 'quote_columns': False, } } diff --git a/test/integration/036_snowflake_view_dependency_test/test_view_binding_dependency.py b/test/integration/036_snowflake_view_dependency_test/test_view_binding_dependency.py index cc89aaca214..61ba9baafae 100644 --- a/test/integration/036_snowflake_view_dependency_test/test_view_binding_dependency.py +++ b/test/integration/036_snowflake_view_dependency_test/test_view_binding_dependency.py @@ -16,9 +16,7 @@ def project_config(self): 'config-version': 2, 'data-paths': ['data'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, 'quoting': { 'schema': False, diff --git a/test/integration/039_config_test/test_configs.py b/test/integration/039_config_test/test_configs.py index ff19f3d6baa..a0369f2fdca 100644 --- a/test/integration/039_config_test/test_configs.py +++ b/test/integration/039_config_test/test_configs.py @@ -19,18 +19,14 @@ def project_config(self): 'data-paths': ['data'], 'models': { 'test': { - 'config': { - # the model configs will override this - 'materialized': 'invalid', - # the model configs will append to these - 'tags': ['tag_one'], - } + # the model configs will override this + 'materialized': 'invalid', + # the model configs will append to these + 'tags': ['tag_one'], }, }, 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -84,9 +80,7 @@ def project_config(self): 'data-paths': ['data'], 'target-path': "target_{{ modules.datetime.datetime.utcnow().strftime('%Y%m%dT%H%M%S') }}", 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } @@ -109,14 +103,10 @@ def project_config(self): 'config-version': 2, 'data-paths': ['data'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, 'test': { 'seed': { - 'config': { - 'enabled': False, - }, + 'enabled': False, }, }, }, diff --git a/test/integration/040_override_database_test/test_override_database.py b/test/integration/040_override_database_test/test_override_database.py index c3cf1130ec2..37ea59b8eb5 100644 --- a/test/integration/040_override_database_test/test_override_database.py +++ b/test/integration/040_override_database_test/test_override_database.py @@ -64,9 +64,7 @@ def project_config(self): 'database': True, }, 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, } } @@ -114,14 +112,10 @@ def run_database_override(self): 'alternate_db': self.alternative_database, }, 'models': { - 'config': { - 'database': self.alternative_database, - }, + 'database': self.alternative_database, 'test': { 'subfolder': { - 'config': { - 'database': self.default_database, - } + 'database': self.default_database, } } }, @@ -156,9 +150,7 @@ def run_database_override(self): self.use_default_project({ 'config-version': 2, 'seeds': { - 'config': { - 'database': self.alternative_database - }, + 'database': self.alternative_database }, }) self.run_dbt_notstrict(['seed']) diff --git a/test/integration/041_presto_test/test_simple_presto_view.py b/test/integration/041_presto_test/test_simple_presto_view.py index c11c3733924..44190e6b122 100644 --- a/test/integration/041_presto_test/test_simple_presto_view.py +++ b/test/integration/041_presto_test/test_simple_presto_view.py @@ -20,9 +20,7 @@ def project_config(self): 'data-paths': ['data'], 'macro-paths': ['macros'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/042_sources_test/test_sources.py b/test/integration/042_sources_test/test_sources.py index 57647c5de4c..67be460863c 100644 --- a/test/integration/042_sources_test/test_sources.py +++ b/test/integration/042_sources_test/test_sources.py @@ -25,9 +25,7 @@ def project_config(self): 'data-paths': ['data'], 'quoting': {'database': True, 'schema': True, 'identifier': True}, 'seeds': { - 'config': { - 'quote_columns': True, - }, + 'quote_columns': True, }, } diff --git a/test/integration/045_test_severity_tests/test_severity.py b/test/integration/045_test_severity_tests/test_severity.py index 1a20c68a8ce..66f2a2dbe9e 100644 --- a/test/integration/045_test_severity_tests/test_severity.py +++ b/test/integration/045_test_severity_tests/test_severity.py @@ -16,9 +16,7 @@ def project_config(self): 'data-paths': ['data'], 'test-paths': ['tests'], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/047_dbt_ls_test/test_ls.py b/test/integration/047_dbt_ls_test/test_ls.py index d1e5e5123dc..9fbacdc5e41 100644 --- a/test/integration/047_dbt_ls_test/test_ls.py +++ b/test/integration/047_dbt_ls_test/test_ls.py @@ -29,9 +29,7 @@ def project_config(self): 'data-paths': [self.dir('data')], 'test-paths': [self.dir('tests')], 'seeds': { - 'config': { - 'quote_columns': False, - }, + 'quote_columns': False, }, } diff --git a/test/integration/048_rpc_test/test_rpc.py b/test/integration/048_rpc_test/test_rpc.py index e981ccfa256..d90bb075941 100644 --- a/test/integration/048_rpc_test/test_rpc.py +++ b/test/integration/048_rpc_test/test_rpc.py @@ -149,9 +149,7 @@ def project_config(self): 'quoting': {'database': True, 'schema': True, 'identifier': True}, 'macro-paths': ['macros'], 'seeds': { - 'config': { - 'quote_columns': False, - } + 'quote_columns': False, }, } diff --git a/test/integration/050_warehouse_test/test_warehouses.py b/test/integration/050_warehouse_test/test_warehouses.py index 608118a5ff3..eaef4ddb8ac 100644 --- a/test/integration/050_warehouse_test/test_warehouses.py +++ b/test/integration/050_warehouse_test/test_warehouses.py @@ -40,9 +40,7 @@ def project_config(self): 'source-paths': ['project-config-models'], 'models': { 'test': { - 'config': { - 'snowflake_warehouse': os.getenv('SNOWFLAKE_TEST_ALT_WAREHOUSE', 'DBT_TEST_ALT'), - }, + 'snowflake_warehouse': os.getenv('SNOWFLAKE_TEST_ALT_WAREHOUSE', 'DBT_TEST_ALT'), }, }, } diff --git a/test/integration/052_column_quoting/test_column_quotes.py b/test/integration/052_column_quoting/test_column_quotes.py index 042d9e95258..f18ea6ff828 100644 --- a/test/integration/052_column_quoting/test_column_quotes.py +++ b/test/integration/052_column_quoting/test_column_quotes.py @@ -62,9 +62,7 @@ def project_config(self): return { 'config-version': 2, 'seeds': { - 'config': { - 'quote_columns': False, - } + 'quote_columns': False, }, } @@ -99,9 +97,7 @@ def project_config(self): return { 'config-version': 2, 'seeds': { - 'config': { - 'quote_columns': True, - } + 'quote_columns': True, }, } diff --git a/test/integration/055_ref_override_test/test_ref_override.py b/test/integration/055_ref_override_test/test_ref_override.py index 0af86edc7c4..360bfa64b28 100644 --- a/test/integration/055_ref_override_test/test_ref_override.py +++ b/test/integration/055_ref_override_test/test_ref_override.py @@ -13,10 +13,8 @@ def project_config(self): 'data-paths': ['data'], "macro-paths": ["macros"], 'seeds': { - 'config': { - 'quote_columns': False - } - } + 'quote_columns': False, + }, } @property diff --git a/test/integration/058_fail_fast/test_fail_fast_run.py b/test/integration/058_fail_fast/test_fail_fast_run.py index f3a0feaee04..d8aa9cd9aa0 100644 --- a/test/integration/058_fail_fast/test_fail_fast_run.py +++ b/test/integration/058_fail_fast/test_fail_fast_run.py @@ -14,23 +14,21 @@ def project_config(self): "on-run-start": "create table if not exists {{ target.schema }}.audit (model text)", 'models': { 'test': { - 'config': { - 'pre-hook': [ - { - # we depend on non-deterministic nature of tasks execution - # there is possibility to run next task in-between - # first task failure and adapter connections cancellations - # if you encounter any problems with these tests please report - # the sleep command with random time minimize the risk - 'sql': "select pg_sleep(random())", - 'transaction': False - }, - { - 'sql': "insert into {{ target.schema }}.audit values ('{{ this }}')", - 'transaction': False - } - ], - } + 'pre-hook': [ + { + # we depend on non-deterministic nature of tasks execution + # there is possibility to run next task in-between + # first task failure and adapter connections cancellations + # if you encounter any problems with these tests please report + # the sleep command with random time minimize the risk + 'sql': "select pg_sleep(random())", + 'transaction': False + }, + { + 'sql': "insert into {{ target.schema }}.audit values ('{{ this }}')", + 'transaction': False + } + ], } } }