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

Commit 15abb90

Browse files
committed
Use the legacy logic for dbt < 1.3.0
1 parent d093690 commit 15abb90

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

data_diff/dbt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def default_profiles_dir() -> Path:
5252
return Path.cwd() if (Path.cwd() / PROFILES_FILE).exists() else Path.home() / ".dbt"
5353

5454

55+
def legacy_profiles_dir() -> Path:
56+
return Path.home() / ".dbt"
57+
58+
5559
@dataclass
5660
class DiffVars:
5761
dev_path: List[str]
@@ -294,6 +298,9 @@ def get_models(self):
294298

295299
dbt_version = parse_version(run_results_obj.metadata.dbt_version)
296300

301+
if dbt_version < parse_version("1.3.0"):
302+
self.profiles_dir = legacy_profiles_dir()
303+
297304
if dbt_version < parse_version(LOWER_DBT_V) or dbt_version >= parse_version(UPPER_DBT_V):
298305
raise Exception(
299306
f"Found dbt: v{dbt_version} Expected the dbt project's version to be >= {LOWER_DBT_V} and < {UPPER_DBT_V}"

0 commit comments

Comments
 (0)