From 42d77cc13be74ad696a6ddbbf65824e8e46a12a4 Mon Sep 17 00:00:00 2001 From: Jorrit Sandbrink Date: Tue, 17 Sep 2024 12:29:07 +0400 Subject: [PATCH 1/2] bring airflow group back to make dev --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 65811281716e5f9f7a050112624e6cb74ae3a4a7 Mon Sep 17 00:00:00 2001 From: Jorrit Sandbrink Date: Tue, 17 Sep 2024 13:42:19 +0400 Subject: [PATCH 2/2] replace try_get_deltatable --- dlt/destinations/impl/filesystem/filesystem.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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]: