Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 716d3a3

Browse files
committed
format
1 parent bf3ba0e commit 716d3a3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

data_diff/dbt.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def dbt_diff(
123123
)
124124

125125
for model in models:
126-
diff_vars = _get_diff_vars(dbt_parser, config_prod_database, config_prod_schema, config_prod_custom_schema, model)
126+
diff_vars = _get_diff_vars(
127+
dbt_parser, config_prod_database, config_prod_schema, config_prod_custom_schema, model
128+
)
127129

128130
if diff_vars.primary_keys:
129131
if is_cloud:
@@ -160,21 +162,20 @@ def _get_diff_vars(
160162
# prod schema name differs from dev schema name
161163
if config_prod_schema:
162164
custom_schema = model.config.schema_
163-
165+
164166
# the model has a custom schema config(schema='some_schema')
165167
if custom_schema:
166168
if not config_prod_custom_schema:
167-
raise ValueError(f"Found a custom schema on model {model.name}, but no value for\nvars:\n data_diff:\n prod_custom_schema:\nPlease set a value!")
168-
prod_schema = config_prod_custom_schema.replace('<custom_schema>', custom_schema)
169+
raise ValueError(
170+
f"Found a custom schema on model {model.name}, but no value for\nvars:\n data_diff:\n prod_custom_schema:\nPlease set a value!"
171+
)
172+
prod_schema = config_prod_custom_schema.replace("<custom_schema>", custom_schema)
169173
# no custom schema, use the default
170174
else:
171175
prod_schema = config_prod_schema
172176
else:
173177
prod_schema = dev_schema
174178

175-
176-
177-
178179
if dbt_parser.requires_upper:
179180
dev_qualified_list = [x.upper() for x in [dev_database, dev_schema, model.alias]]
180181
prod_qualified_list = [x.upper() for x in [prod_database, prod_schema, model.alias]]

0 commit comments

Comments
 (0)