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

Commit ef2e919

Browse files
committed
add a dock link when vars do not exist
1 parent 2f3e83d commit ef2e919

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

data_diff/dbt_parser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,15 @@ def __init__(self, profiles_dir_override: str, project_dir_override: str) -> Non
6363
self.unique_columns = self.get_unique_columns()
6464

6565
def get_datadiff_variables(self) -> dict:
66-
vars = get_from_dict_with_raise(self.project_dict, "vars", f"No vars: found in dbt_project.yml.")
67-
return get_from_dict_with_raise(vars, "data_diff", f"data_diff: section not found in dbt_project.yml vars:.")
66+
doc_url = "https://docs.datafold.com/development_testing/open_source#configure-your-dbt-project"
67+
vars = get_from_dict_with_raise(
68+
self.project_dict, "vars", f"No vars: found in dbt_project.yml.\n\nConfigure your dbt project: \n{doc_url}\n"
69+
)
70+
return get_from_dict_with_raise(
71+
vars,
72+
"data_diff",
73+
f"data_diff: section not found in dbt_project.yml.\n\nConfigure your dbt project: \n{doc_url}\n",
74+
)
6875

6976
def get_models(self):
7077
with open(self.project_dir / RUN_RESULTS_PATH) as run_results:

0 commit comments

Comments
 (0)