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

raise when project vars not found #478

Merged
merged 1 commit into from
Apr 4, 2023
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
7 changes: 6 additions & 1 deletion data_diff/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,12 @@ def __init__(self, profiles_dir_override: str, project_dir_override: str) -> Non
self.unique_columns = self.get_unique_columns()

def get_datadiff_variables(self) -> dict:
return self.project_dict.get("vars").get("data_diff")
vars = get_from_dict_with_raise(
self.project_dict, "vars", f"No vars: found in dbt_project.yml."
)
return get_from_dict_with_raise(
vars, "data_diff", f"data_diff: section not found in dbt_project.yml vars:."
)

def get_models(self):
with open(self.project_dir / RUN_RESULTS_PATH) as run_results:
Expand Down