dc-python-sdk 1.5.41__tar.gz → 1.5.42__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dc_python_sdk-1.5.41/src/dc_python_sdk.egg-info → dc_python_sdk-1.5.42}/PKG-INFO +1 -1
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/pyproject.toml +1 -1
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/setup.cfg +1 -1
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42/src/dc_python_sdk.egg-info}/PKG-INFO +1 -1
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/pipeline.py +33 -1
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/LICENSE +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/README.md +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/SOURCES.txt +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/dependency_links.txt +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/entry_points.txt +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/requires.txt +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/top_level.txt +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/__init__.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/app.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/cli.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/errors.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/handler.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/__init__.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/ai.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/ai_http.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/mapping.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/models/__init__.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/models/enums.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/models/errors.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/models/log_templates.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/models/pipeline_details.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/server.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/__init__.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/api.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/aws.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/environment.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/loader.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/logger.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/src/services/session.py +0 -0
- {dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_sdk/types.py +0 -0
|
@@ -125,6 +125,7 @@ class PipelineConductor:
|
|
|
125
125
|
self.log(self.log_templates.GET_DATA_FINISH.format(self.row_count, self.pipeline_details.source_object_id))
|
|
126
126
|
|
|
127
127
|
def load_data(self, batch_start):
|
|
128
|
+
self._ensure_mapping_has_default_data_types()
|
|
128
129
|
self.log(self.log_templates.LOAD_DATA_START.format(self.pipeline_details.destination_object_id, len(self._get_field_ids())))
|
|
129
130
|
|
|
130
131
|
keys = []
|
|
@@ -135,7 +136,7 @@ class PipelineConductor:
|
|
|
135
136
|
|
|
136
137
|
if not keys:
|
|
137
138
|
# Call load_data with empty data when there are no keys
|
|
138
|
-
loaded = self.connector.load_data([], self.pipeline_details.destination_object_id, self._get_mapping(), self.pipeline_details.update_method_cd, 0,
|
|
139
|
+
loaded = self.connector.load_data([], self.pipeline_details.destination_object_id, self._get_mapping(), self.pipeline_details.update_method_cd, 0, 1)
|
|
139
140
|
if not loaded:
|
|
140
141
|
raise errors.LoadDataError("Loading data failed.")
|
|
141
142
|
else:
|
|
@@ -369,6 +370,37 @@ class PipelineConductor:
|
|
|
369
370
|
return []
|
|
370
371
|
return json.loads(self.mapping)
|
|
371
372
|
|
|
373
|
+
def _mapping_entry_has_data_type(self, entry):
|
|
374
|
+
data_type = entry.get("data_type")
|
|
375
|
+
if data_type is None:
|
|
376
|
+
return False
|
|
377
|
+
if isinstance(data_type, str) and not data_type.strip():
|
|
378
|
+
return False
|
|
379
|
+
return True
|
|
380
|
+
|
|
381
|
+
def _ensure_mapping_has_default_data_types(self):
|
|
382
|
+
default_data_type = getattr(self.connector, "default_data_type", None)
|
|
383
|
+
if not default_data_type:
|
|
384
|
+
return
|
|
385
|
+
|
|
386
|
+
mapping = self._get_mapping()
|
|
387
|
+
if not mapping:
|
|
388
|
+
return
|
|
389
|
+
|
|
390
|
+
changed = False
|
|
391
|
+
for entry in mapping:
|
|
392
|
+
if not self._mapping_entry_has_data_type(entry):
|
|
393
|
+
entry["data_type"] = default_data_type
|
|
394
|
+
changed = True
|
|
395
|
+
|
|
396
|
+
if not changed:
|
|
397
|
+
return
|
|
398
|
+
|
|
399
|
+
mapping_json = json.dumps(mapping)
|
|
400
|
+
self.pipeline_details.pipeline_mapping_json = mapping_json
|
|
401
|
+
|
|
402
|
+
self.api.create_pipeline_mapping(self.pipeline_id, mapping_json)
|
|
403
|
+
|
|
372
404
|
def _get_log_messages(self):
|
|
373
405
|
# TODO: Make logs more dynamic
|
|
374
406
|
# logs = self.api.get("log/templates")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dc_python_sdk-1.5.41 → dc_python_sdk-1.5.42}/src/dc_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|