diff --git a/data_diff/dbt_parser.py b/data_diff/dbt_parser.py index ea8e7126..f80133be 100644 --- a/data_diff/dbt_parser.py +++ b/data_diff/dbt_parser.py @@ -1,3 +1,4 @@ +from argparse import Namespace from collections import defaultdict import json import os @@ -22,6 +23,14 @@ def import_dbt_dependencies(): raise RuntimeError("Could not import 'dbt' package. You can install it using: pip install 'data-diff[dbt]'.") # dbt 1.5+ specific stuff to power selection of models + try: + # ProfileRenderer.render_data() fails without instantiating global flag MACRO_DEBUGGING in dbt-core 1.5 + from dbt.flags import set_flags + + set_flags(Namespace(MACRO_DEBUGGING=False)) + except: + pass + try: from dbt.cli.main import dbtRunner except ImportError: