Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dbt: improve parsing logs #1981

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions soda/dbt/soda/cloud/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ def _parse_manifest(
node = ParsedGenericTestNode(**node)
test_nodes[node_name] = node
else:
# TODO: ??????????????????? COrect indent???
self.scan._logs.info(f"Ignoring unsupported {node_name}")
self.scan._logs.info(f"Ignoring unsupported test node '{node_name}'. Missing 'test_metadata'.")
else:
self.scan._logs.debug(f"Ignoring unsupported node type '{node['resource_type']}', {node_name}")

else:
model_nodes = None
Expand Down Expand Up @@ -377,10 +378,12 @@ def _create_nodes_to_tests_mapping(
test_unique_id: set(test_nodes[test_unique_id].depends_on["nodes"]) for test_unique_id in test_unique_ids
}

model_unique_ids = reduce(
or_,
[model_unique_ids for model_unique_ids in models_that_tests_depends_on.values()],
)
model_unique_ids = {}
if models_that_tests_depends_on:
model_unique_ids = reduce(
or_,
[model_unique_ids for model_unique_ids in models_that_tests_depends_on.values()],
)

models_with_tests = defaultdict(set)
for model_unique_id in model_unique_ids:
Expand Down