keboola.component 1.6.4__tar.gz → 1.6.6__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.
- {keboola.component-1.6.4/src/keboola.component.egg-info → keboola.component-1.6.6}/PKG-INFO +1 -1
- {keboola.component-1.6.4 → keboola.component-1.6.6}/setup.py +1 -1
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/dao.py +72 -25
- {keboola.component-1.6.4 → keboola.component-1.6.6/src/keboola.component.egg-info}/PKG-INFO +1 -1
- {keboola.component-1.6.4 → keboola.component-1.6.6}/LICENSE +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/README.md +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/setup.cfg +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/__init__.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/base.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/exceptions.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/interface.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/sync_actions.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola/component/table_schema.py +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/SOURCES.txt +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/dependency_links.txt +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/not-zip-safe +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/requires.txt +0 -0
- {keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/top_level.txt +0 -0
|
@@ -849,6 +849,15 @@ class TableDefinition(IODefinition):
|
|
|
849
849
|
self.delete_where_column = None
|
|
850
850
|
self.delete_where_operator = None
|
|
851
851
|
|
|
852
|
+
if kwargs.get('delete_where_values'):
|
|
853
|
+
self.delete_where_values = kwargs['delete_where_values']
|
|
854
|
+
|
|
855
|
+
if kwargs.get('delete_where_column'):
|
|
856
|
+
self.delete_where_column = kwargs['delete_where_column']
|
|
857
|
+
|
|
858
|
+
if kwargs.get('delete_where_operator'):
|
|
859
|
+
self.delete_where_operator = kwargs['delete_where_operator']
|
|
860
|
+
|
|
852
861
|
self.set_delete_where_from_dict(delete_where)
|
|
853
862
|
self.write_always = write_always
|
|
854
863
|
|
|
@@ -883,7 +892,8 @@ class TableDefinition(IODefinition):
|
|
|
883
892
|
delimiter: Optional[str] = ',',
|
|
884
893
|
delete_where: Optional[dict] = None,
|
|
885
894
|
write_always: Optional[bool] = False,
|
|
886
|
-
schema: Optional[
|
|
895
|
+
schema: Optional[Union[TypeOrderedDict[str, ColumnDefinition], list[str]]] = None,
|
|
896
|
+
**kwargs
|
|
887
897
|
):
|
|
888
898
|
"""
|
|
889
899
|
Factory method for creating a TableDefinition instance for output tables.
|
|
@@ -918,6 +928,7 @@ class TableDefinition(IODefinition):
|
|
|
918
928
|
delete_where=delete_where,
|
|
919
929
|
write_always=write_always,
|
|
920
930
|
schema=schema,
|
|
931
|
+
**kwargs
|
|
921
932
|
)
|
|
922
933
|
|
|
923
934
|
@classmethod
|
|
@@ -935,7 +946,7 @@ class TableDefinition(IODefinition):
|
|
|
935
946
|
delete_where: Optional[dict] = None,
|
|
936
947
|
stage: Optional[str] = 'in',
|
|
937
948
|
write_always: Optional[bool] = False,
|
|
938
|
-
schema: Optional[
|
|
949
|
+
schema: Optional[Union[TypeOrderedDict[str, ColumnDefinition], list[str]]] = None,
|
|
939
950
|
rows_count: Optional[int] = None,
|
|
940
951
|
data_size_bytes: Optional[int] = None,
|
|
941
952
|
is_alias: Optional[bool] = False,
|
|
@@ -945,7 +956,9 @@ class TableDefinition(IODefinition):
|
|
|
945
956
|
id: Optional[str] = '',
|
|
946
957
|
created: Optional[str] = None,
|
|
947
958
|
last_change_date: Optional[str] = None,
|
|
948
|
-
last_import_date: Optional[str] = None
|
|
959
|
+
last_import_date: Optional[str] = None,
|
|
960
|
+
**kwargs
|
|
961
|
+
):
|
|
949
962
|
"""
|
|
950
963
|
Factory method for creating a TableDefinition instance for input tables.
|
|
951
964
|
|
|
@@ -1000,7 +1013,9 @@ class TableDefinition(IODefinition):
|
|
|
1000
1013
|
id=id,
|
|
1001
1014
|
created=created,
|
|
1002
1015
|
last_change_date=last_change_date,
|
|
1003
|
-
last_import_date=last_import_date
|
|
1016
|
+
last_import_date=last_import_date,
|
|
1017
|
+
**kwargs
|
|
1018
|
+
)
|
|
1004
1019
|
|
|
1005
1020
|
@classmethod
|
|
1006
1021
|
def convert_to_column_definition(cls, column_name, column_metadata, primary_key=False):
|
|
@@ -1088,6 +1103,9 @@ class TableDefinition(IODefinition):
|
|
|
1088
1103
|
else:
|
|
1089
1104
|
name = Path(manifest_file_path).stem
|
|
1090
1105
|
|
|
1106
|
+
if manifest.get('name'):
|
|
1107
|
+
name = manifest.get('name')
|
|
1108
|
+
|
|
1091
1109
|
# test if the manifest is output and incompatible
|
|
1092
1110
|
force_legacy_mode = False
|
|
1093
1111
|
if not manifest.get('columns') and manifest.get('primary_key'):
|
|
@@ -1097,28 +1115,57 @@ class TableDefinition(IODefinition):
|
|
|
1097
1115
|
|
|
1098
1116
|
if manifest.get('id'):
|
|
1099
1117
|
stage = 'in'
|
|
1118
|
+
table_def = cls.build_input_definition(
|
|
1119
|
+
# helper parameters
|
|
1120
|
+
stage=stage,
|
|
1121
|
+
force_legacy_mode=force_legacy_mode,
|
|
1122
|
+
is_sliced=is_sliced,
|
|
1123
|
+
full_path=full_path,
|
|
1124
|
+
|
|
1125
|
+
# basic in manifest parameters
|
|
1126
|
+
id=manifest.get('id'),
|
|
1127
|
+
uri=manifest.get('uri'),
|
|
1128
|
+
name=name,
|
|
1129
|
+
primary_key=manifest.get('primary_key'),
|
|
1130
|
+
created=manifest.get('created'),
|
|
1131
|
+
last_change_date=manifest.get('last_change_date'),
|
|
1132
|
+
last_import_date=manifest.get('last_import_date'),
|
|
1133
|
+
schema=cls.return_schema_from_manifest(manifest),
|
|
1134
|
+
table_metadata=TableMetadata(manifest),
|
|
1135
|
+
|
|
1136
|
+
# additional in manifest parameters
|
|
1137
|
+
rows_count=manifest.get('rows_count'),
|
|
1138
|
+
data_size_bytes=manifest.get('data_size_bytes'),
|
|
1139
|
+
is_alias=manifest.get('is_alias'),
|
|
1140
|
+
attributes=manifest.get('attributes'),
|
|
1141
|
+
indexed_columns=manifest.get('indexed_columns'),
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1100
1144
|
else:
|
|
1101
1145
|
stage = 'out'
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1146
|
+
table_def = cls.build_output_definition(
|
|
1147
|
+
# helper parameters
|
|
1148
|
+
stage=stage,
|
|
1149
|
+
force_legacy_mode=force_legacy_mode,
|
|
1150
|
+
is_sliced=is_sliced,
|
|
1151
|
+
full_path=full_path,
|
|
1152
|
+
|
|
1153
|
+
# basic out manifest parameters
|
|
1154
|
+
name=name,
|
|
1155
|
+
destination=manifest.get('destination'),
|
|
1156
|
+
schema=cls.return_schema_from_manifest(manifest),
|
|
1157
|
+
incremental=manifest.get('incremental'),
|
|
1158
|
+
primary_key=manifest.get('primary_key'),
|
|
1159
|
+
write_always=manifest.get('write_always', False),
|
|
1160
|
+
delimiter=manifest.get('delimiter', ','),
|
|
1161
|
+
enclosure=manifest.get('enclosure', '"'),
|
|
1162
|
+
table_metadata=TableMetadata(manifest),
|
|
1163
|
+
|
|
1164
|
+
# additional in manifest parameters
|
|
1165
|
+
delete_where_values=manifest.get('delete_where_values'),
|
|
1166
|
+
delete_where_column=manifest.get('delete_where_column'),
|
|
1167
|
+
delete_where_operator=manifest.get('delete_where_operator')
|
|
1168
|
+
)
|
|
1122
1169
|
|
|
1123
1170
|
return table_def
|
|
1124
1171
|
|
|
@@ -1215,7 +1262,7 @@ class TableDefinition(IODefinition):
|
|
|
1215
1262
|
'schema': [col.to_dict(name)
|
|
1216
1263
|
for name, col in self.schema.items()] if isinstance(self.schema, (OrderedDict, dict)) else []
|
|
1217
1264
|
}
|
|
1218
|
-
if legacy_manifest:
|
|
1265
|
+
if legacy_manifest or self.stage == 'in':
|
|
1219
1266
|
fields['columns'] = self.column_names
|
|
1220
1267
|
|
|
1221
1268
|
new_dict = fields.copy()
|
|
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
|
{keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/requires.txt
RENAMED
|
File without changes
|
{keboola.component-1.6.4 → keboola.component-1.6.6}/src/keboola.component.egg-info/top_level.txt
RENAMED
|
File without changes
|