Skip to content

Commit

Permalink
Add code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed May 7, 2024
1 parent 9015de9 commit 98fccea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dlt/common/configuration/providers/airflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def name(self) -> str:
def _look_vault(self, full_key: str, hint: type) -> str:
"""Get Airflow Variable with given `full_key`, return None if not found"""
from airflow.models import Variable

return
with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()):
return Variable.get(full_key, default_var=None) # type: ignore

Expand Down
3 changes: 3 additions & 0 deletions dlt/destinations/impl/duckdb/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def on_resolved(self) -> None:
is_default_path = maybe_is_default_path
self.database = maybe_database

# We need to check it here because the default `native_value` for duckdb is :memory:
# because if we do this check at the very beginning we will fail the default usecase
# when users just specify destination="duckdb" thus it is undesired behavior.
if isinstance(self.database, str) and self.database == ":memory:":
raise InvalidInMemoryDuckdbCredentials()

Expand Down

0 comments on commit 98fccea

Please sign in to comment.