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

Commit cfd941f

Browse files
authored
Merge pull request #528 from dlawin/guidance_when_no_dbt_vars
add a doc link when vars do not exist
2 parents 2f3e83d + d3365ef commit cfd941f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

data_diff/dbt_parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ 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+
error_message = f"vars: data_diff: section not found in dbt_project.yml.\n\nTo solve this, please configure your dbt project: \n{doc_url}\n"
68+
vars = get_from_dict_with_raise(self.project_dict, "vars", error_message)
69+
return get_from_dict_with_raise(vars, "data_diff", error_message)
6870

6971
def get_models(self):
7072
with open(self.project_dir / RUN_RESULTS_PATH) as run_results:

data_diff/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.7.3"
1+
__version__ = "0.7.4"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "data-diff"
3-
version = "0.7.3"
3+
version = "0.7.4"
44
description = "Command-line tool and Python library to efficiently diff rows across two different databases."
55
authors = ["Datafold <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)