From 2f33e349ae3de4e7514d04456c0f31e831bbcab7 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Tue, 8 Oct 2024 10:17:04 +0200 Subject: [PATCH] feat: modify_mapped_data_source add support for SQL datasets JIRA: PSDK-206 risk: low --- .../declarative_model/workspace/logical_model/ldm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/logical_model/ldm.py b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/logical_model/ldm.py index 42f2f973a..d0e5251f4 100644 --- a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/logical_model/ldm.py +++ b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/logical_model/ldm.py @@ -188,6 +188,10 @@ def modify_mapped_data_source(self, data_source_mapping: Optional[dict]) -> Cata data_source_id = dataset.data_source_table_id.data_source_id if data_source_id in data_source_mapping: dataset.data_source_table_id.data_source_id = data_source_mapping[data_source_id] + if dataset.sql is not None: + data_source_id = dataset.sql.data_source_id + if data_source_id in data_source_mapping: + dataset.sql.data_source_id = data_source_mapping[data_source_id] return self @staticmethod