Skip to content

Commit

Permalink
fix intermittent delta panic issue (#1832)
Browse files Browse the repository at this point in the history
* bring airflow group back to make dev

* replace try_get_deltatable
  • Loading branch information
jorritsandbrink authored Sep 19, 2024
1 parent c96ce7b commit ff1434b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit ff1434b

Please sign in to comment.