Skip to content

Commit

Permalink
[Feature] DRC-1053 Support env_var when using Query Diff and Sandbox
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Huang <[email protected]>
  • Loading branch information
kentwelcome committed Jan 23, 2025
1 parent c201740 commit d934b92
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 d934b92

Please sign in to comment.