From 8ecf7c62688bd27c702f94e5959799c82c90ecc3 Mon Sep 17 00:00:00 2001 From: Jorrit Sandbrink Date: Tue, 24 Sep 2024 15:54:22 +0400 Subject: [PATCH] remove natural_key remnants --- dlt/common/schema/typing.py | 1 - dlt/extract/hints.py | 6 ------ 2 files changed, 7 deletions(-) diff --git a/dlt/common/schema/typing.py b/dlt/common/schema/typing.py index a70c354e17..dab502a272 100644 --- a/dlt/common/schema/typing.py +++ b/dlt/common/schema/typing.py @@ -241,7 +241,6 @@ class TScd2StrategyDict(TMergeDispositionDict, total=False): boundary_timestamp: Optional[TAnyDateTime] row_version_column_name: Optional[str] retire_absent_rows: Optional[bool] - natural_key: Optional[str] TWriteDispositionConfig = Union[ diff --git a/dlt/extract/hints.py b/dlt/extract/hints.py index dfa01eabcf..29f176b93a 100644 --- a/dlt/extract/hints.py +++ b/dlt/extract/hints.py @@ -460,12 +460,6 @@ def _merge_merge_disposition_dict(dict_: Dict[str, Any]) -> None: dict_["x-boundary-timestamp"] = md_dict["boundary_timestamp"] if "retire_absent_rows" in md_dict: dict_["x-retire-absent-rows"] = md_dict["retire_absent_rows"] - if "natural_key" in md_dict: - nk = md_dict["natural_key"] - if nk in dict_["columns"]: - dict_["columns"][nk]["x-natural-key"] = True - else: - dict_["columns"][nk] = {"name": nk, "x-natural-key": True} if md_dict.get("validity_column_names") is None: from_, to = DEFAULT_VALIDITY_COLUMN_NAMES else: