Skip to content

Commit 14cca2d

Browse files
committed
allows to disable lake formation
1 parent a98bb87 commit 14cca2d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

dlt/destinations/impl/athena/athena.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def update_stored_schema(
348348
if (
349349
self.config.lakeformation_config is not None
350350
and self.config.lakeformation_config.enabled
351+
is not None # both True and False are actionable
351352
):
352353
self.manage_lf_tags()
353354
return applied_update

dlt/destinations/impl/athena/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@configspec
1010
class LakeformationConfig:
11-
enabled: bool = False
11+
enabled: Optional[bool] = None
1212
tags: Optional[Dict[str, str]] = None
1313

1414

tests/load/athena_iceberg/test_lakeformation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ def create_pipelines(
186186
)
187187
lf_disabled_pipeline = destination_config.setup_pipeline(
188188
pipeline_name,
189-
destination=destination_config.destination_factory(),
189+
destination=destination_config.destination_factory(
190+
lakeformation_config=LakeformationConfig(enabled=False)
191+
),
190192
dataset_name=dataset_name,
191193
staging=staging_destination,
192194
)

0 commit comments

Comments
 (0)