Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor reading env vars #888

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Refactor reading env vars #888

merged 3 commits into from
Dec 19, 2024

Conversation

benc-db
Copy link
Collaborator

@benc-db benc-db commented Dec 19, 2024

Description

Centralize env var reading since it is actually a global state reference, and we should be aware of as such. We will lazy set once, and return values from then on (since allowing users to change the value during a run, and have that change reflected seems crazy unpredictable).

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

@@ -475,6 +473,8 @@ def add_query(
auto_begin: bool = True,
bindings: Optional[Any] = None,
abridge_sql_log: bool = False,
retryable_exceptions: tuple[type[Exception], ...] = tuple(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is new interface in latest upstream. Hopefully this doesn't break anything, otherwise we (and other adapters) will be in for a world of hurt.

@benc-db benc-db merged commit 5f6412d into main Dec 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant