diff --git a/Makefile b/Makefile index 501a9925fa..3a99d96e5e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/dlt/destinations/impl/filesystem/filesystem.py b/dlt/destinations/impl/filesystem/filesystem.py index c9f9797785..5d244020dd 100644 --- a/dlt/destinations/impl/filesystem/filesystem.py +++ b/dlt/destinations/impl/filesystem/filesystem.py @@ -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]: