omnata-plugin-runtime 0.10.4a230__py3-none-any.whl → 0.10.5a233__py3-none-any.whl
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.
- omnata_plugin_runtime/configuration.py +60 -1
- omnata_plugin_runtime/json_schema.py +5 -4
- {omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/RECORD +6 -6
- {omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/WHEEL +0 -0
@@ -50,6 +50,20 @@ class InboundSyncStrategy(str, Enum):
|
|
50
50
|
INCREMENTAL = "Incremental"
|
51
51
|
AUTO = "Auto" # not valid as an individual stream choice, only when referring to a forward preference (new_stream_sync_strategy)
|
52
52
|
|
53
|
+
class InboundSyncStrategyBulkConfiguration(str, Enum):
|
54
|
+
"""
|
55
|
+
Supercedes InboundSyncBulkConfiguration, which was a combination of sync strategy and storage behaviour.
|
56
|
+
"""
|
57
|
+
AUTO = "auto"
|
58
|
+
MANUAL = "manual"
|
59
|
+
|
60
|
+
class InboundStorageBehaviourBulkConfiguration(str, Enum):
|
61
|
+
"""
|
62
|
+
Supercedes InboundSyncBulkConfiguration, which was a combination of sync strategy and storage behaviour.
|
63
|
+
"""
|
64
|
+
MERGE = "merge"
|
65
|
+
APPEND = "append"
|
66
|
+
MANUAL = "manual"
|
53
67
|
|
54
68
|
class InboundSyncBulkConfiguration(str, Enum):
|
55
69
|
"""
|
@@ -479,7 +493,52 @@ class InboundSyncStreamsConfiguration(SubscriptableBaseModel):
|
|
479
493
|
new_stream_storage_behaviour: Optional[InboundStorageBehaviour] = Field(default=None)
|
480
494
|
included_streams: Dict[str, StoredStreamConfiguration]
|
481
495
|
excluded_streams: List[str]
|
482
|
-
bulk_configuration: InboundSyncBulkConfiguration =
|
496
|
+
bulk_configuration: Optional[InboundSyncBulkConfiguration] = None
|
497
|
+
sync_strategy_bulk_configuration: InboundSyncStrategyBulkConfiguration
|
498
|
+
storage_behaviour_bulk_configuration: InboundStorageBehaviourBulkConfiguration
|
499
|
+
|
500
|
+
"""
|
501
|
+
We use a model_validator to manage the migration from bulk_configuration to the new
|
502
|
+
sync_strategy_bulk_configuration and storage_behaviour_bulk_configuration objects.
|
503
|
+
This means that if bulk_configuration is set, it will be used to populate the new objects.
|
504
|
+
"""
|
505
|
+
@model_validator(mode='before')
|
506
|
+
@classmethod
|
507
|
+
def migrate_bulk_configuration(cls, data: Any) -> Any:
|
508
|
+
if 'bulk_configuration' in data:
|
509
|
+
# Recently deprecated values
|
510
|
+
# AUTO_MERGE = "Auto / Merge changes" # Merge
|
511
|
+
# AUTO_APPEND = "Auto / Keep history" # Append
|
512
|
+
# CUSTOMIZE = "Customize - choose sync behaviours for each object"
|
513
|
+
# Deprecated longer ago
|
514
|
+
# ALL_FULL_REPLACE = "All Objects - Full refresh / Replace"
|
515
|
+
# ALL_FULL_APPEND = "All Objects - Full refresh / Append"
|
516
|
+
# ALL_INCR_MERGE = "All Objects - Incremental / Merge"
|
517
|
+
# ALL_INCR_APPEND = "All Objects - Incremental / Append"
|
518
|
+
if data['bulk_configuration']== InboundSyncBulkConfiguration.AUTO_MERGE.value:
|
519
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
520
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
521
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.AUTO_APPEND.value:
|
522
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
523
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
524
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.CUSTOMIZE.value:
|
525
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
526
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MANUAL.value
|
527
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_FULL_REPLACE.value:
|
528
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
529
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
530
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_FULL_APPEND.value:
|
531
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
532
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
533
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_INCR_MERGE.value:
|
534
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
535
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
536
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_INCR_APPEND.value:
|
537
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
538
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
539
|
+
# remove this once the old UI is deprecated
|
540
|
+
#del data['bulk_configuration']
|
541
|
+
return data
|
483
542
|
|
484
543
|
|
485
544
|
class StoredStreamConfiguration(SubscriptableBaseModel):
|
@@ -446,11 +446,12 @@ class SnowflakeViewParts(BaseModel):
|
|
446
446
|
column_name_expression=column_name_expression
|
447
447
|
)
|
448
448
|
joined_parts = []
|
449
|
+
# remove the joins from the main part if they are not in the raw stream locations
|
450
|
+
main_stream_view_part.joins = [join for join in main_stream_view_part.joins
|
451
|
+
if join.join_stream_name in raw_stream_locations
|
452
|
+
and join.join_stream_name in stream_schemas]
|
453
|
+
|
449
454
|
for join in main_stream_view_part.joins:
|
450
|
-
if join.join_stream_name not in raw_stream_locations:
|
451
|
-
continue
|
452
|
-
if join.join_stream_name not in stream_schemas:
|
453
|
-
continue
|
454
455
|
joined_parts.append(normalized_view_part(
|
455
456
|
stream_name=join.join_stream_name,
|
456
457
|
raw_table_location=raw_stream_locations[join.join_stream_name],
|
{omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/RECORD
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
omnata_plugin_runtime/__init__.py,sha256=MS9d1whnfT_B3-ThqZ7l63QeC_8OEKTuaYV5wTwRpBA,1576
|
2
2
|
omnata_plugin_runtime/api.py,sha256=baGraSMiD4Yvi3ZWrEv_TKh8Ktd1U8riBdOpe9j0Puw,8202
|
3
|
-
omnata_plugin_runtime/configuration.py,sha256=
|
3
|
+
omnata_plugin_runtime/configuration.py,sha256=8rt_NW0wlJDNbZGkYjz-vKKP3JzIP6HFkgeuG_fRf_Y,46398
|
4
4
|
omnata_plugin_runtime/forms.py,sha256=9YHJ_T17lT-rwyDaUg_0yj_YMPda4DRCw_wrvf8hE0E,19964
|
5
|
-
omnata_plugin_runtime/json_schema.py,sha256=
|
5
|
+
omnata_plugin_runtime/json_schema.py,sha256=NujSQBtyfnvSyw13sSFiSKmZeXkSk5cqCDVyuNwOACg,28395
|
6
6
|
omnata_plugin_runtime/logging.py,sha256=WBuZt8lF9E5oFWM4KYQbE8dDJ_HctJ1pN3BHwU6rcd0,4461
|
7
7
|
omnata_plugin_runtime/omnata_plugin.py,sha256=M0b6f9lKKEoEI0zf-ZwZcIPKPQTmHTIMhvcrBc94Mhg,133278
|
8
8
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=iqGl8_nEEnPGKg3Aem4YLSQ6d5xS3ju5gq8MJbx6sCA,31968
|
9
9
|
omnata_plugin_runtime/rate_limiting.py,sha256=qpr5esU4Ks8hMzuMpSR3gLFdor2ZUXYWCjmsQH_K6lQ,25882
|
10
|
-
omnata_plugin_runtime-0.10.
|
11
|
-
omnata_plugin_runtime-0.10.
|
12
|
-
omnata_plugin_runtime-0.10.
|
13
|
-
omnata_plugin_runtime-0.10.
|
10
|
+
omnata_plugin_runtime-0.10.5a233.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
|
11
|
+
omnata_plugin_runtime-0.10.5a233.dist-info/METADATA,sha256=7g-buTqGgenl_DcE7T9d4Es8juGY79-XlI5Ixmhhip4,2211
|
12
|
+
omnata_plugin_runtime-0.10.5a233.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
13
|
+
omnata_plugin_runtime-0.10.5a233.dist-info/RECORD,,
|
{omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/LICENSE
RENAMED
File without changes
|
{omnata_plugin_runtime-0.10.4a230.dist-info → omnata_plugin_runtime-0.10.5a233.dist-info}/WHEEL
RENAMED
File without changes
|