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

add a doc link when vars do not exist #528

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions data_diff/dbt_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ 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:
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:.")
doc_url = "https://docs.datafold.com/development_testing/open_source#configure-your-dbt-project"
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"
vars = get_from_dict_with_raise(self.project_dict, "vars", error_message)
return get_from_dict_with_raise(vars, "data_diff", error_message)

def get_models(self):
with open(self.project_dir / RUN_RESULTS_PATH) as run_results:
Expand Down
2 changes: 1 addition & 1 deletion data_diff/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.3"
__version__ = "0.7.4"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "data-diff"
version = "0.7.3"
version = "0.7.4"
description = "Command-line tool and Python library to efficiently diff rows across two different databases."
authors = ["Datafold <data-diff@datafold.com>"]
license = "MIT"
Expand Down