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

fix intermittent delta panic issue #1832

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ has-poetry:
poetry --version

dev: has-poetry
poetry install --all-extras --with docs,providers,pipeline,sources,sentry-sdk
poetry install --all-extras --with docs,providers,pipeline,sources,sentry-sdk,airflow

lint:
./tools/check-package.sh
Expand Down
7 changes: 5 additions & 2 deletions dlt/destinations/impl/filesystem/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ def _storage_options(self) -> Dict[str, str]:
return _deltalake_storage_options(self._job_client.config)

def _delta_table(self) -> Optional["DeltaTable"]: # type: ignore[name-defined] # noqa: F821
from dlt.common.libs.deltalake import try_get_deltatable
from dlt.common.libs.deltalake import DeltaTable

return try_get_deltatable(self.make_remote_url(), storage_options=self._storage_options)
if DeltaTable.is_deltatable(self.make_remote_url(), storage_options=self._storage_options):
return DeltaTable(self.make_remote_url(), storage_options=self._storage_options)
else:
return None

@property
def _partition_columns(self) -> List[str]:
Expand Down
Loading