Skip to content

Commit

Permalink
Merge pull request #590 from DataRecce/feature/drc-1053-feature-env_v…
Browse files Browse the repository at this point in the history
…arxxx-should-be-supported-in-query-diff-and

[Feature] DRC-1053 Support env_var when using Query Diff and Sandbox
  • Loading branch information
popcornylu authored Jan 23, 2025
2 parents cff2ce1 + d934b92 commit 5aa75a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recce/adapter/dbt_adapter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,9 @@ def generate_sql(self, sql_template: str, base: bool = False, context=None):
parser = SqlBlockParser(self.runtime_config, manifest, self.runtime_config)

if dbt_version >= dbt_version.parse('v1.8'):
from dbt_common.context import set_invocation_context
from dbt_common.context import set_invocation_context, get_invocation_context
set_invocation_context({})
get_invocation_context()._env = dict(os.environ)

node_id = str("generated_" + uuid.uuid4().hex)
node = parser.parse_remote(sql_template, node_id)
Expand Down

0 comments on commit 5aa75a4

Please sign in to comment.