omnata-plugin-runtime 0.1.46__py3-none-any.whl → 0.1.48__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/omnata_plugin.py +6 -8
- omnata_plugin_runtime/plugin_entrypoints.py +1 -1
- {omnata_plugin_runtime-0.1.46.dist-info → omnata_plugin_runtime-0.1.48.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.1.46.dist-info → omnata_plugin_runtime-0.1.48.dist-info}/RECORD +6 -6
- {omnata_plugin_runtime-0.1.46.dist-info → omnata_plugin_runtime-0.1.48.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.1.46.dist-info → omnata_plugin_runtime-0.1.48.dist-info}/WHEEL +0 -0
@@ -492,20 +492,18 @@ class OutboundSyncRequest(SyncRequest):
|
|
492
492
|
if sync_actions is None:
|
493
493
|
sync_actions = [action() for action in list(STANDARD_OUTBOUND_SYNC_ACTIONS.values())]
|
494
494
|
# ignore null sync actions
|
495
|
-
|
495
|
+
sync_action_names:List[str] = [s.action_name for s in sync_actions if s]
|
496
496
|
# only used by testing framework when running a behave test
|
497
497
|
if self._prebaked_record_state is not None:
|
498
498
|
logger.info('returning prebaked record state')
|
499
|
-
dataframe = self._prebaked_record_state[self._prebaked_record_state['SYNC_ACTION'].isin(
|
499
|
+
dataframe = self._prebaked_record_state[self._prebaked_record_state['SYNC_ACTION'].isin(sync_action_names)] # pylint: disable=unsubscriptable-object
|
500
500
|
if len(dataframe)==0:
|
501
501
|
# no need to do the whole FixedSizeGenerator thing for 0 records
|
502
502
|
return self.__dataframe_wrapper(dataframe,render_jinja)
|
503
|
-
#
|
504
|
-
#
|
503
|
+
# we use map to create an iterable wrapper around the pandas batches which are also iterable
|
504
|
+
# we use an intermediate partial to allow us to pass the extra parameter
|
505
505
|
mapfunc = partial(self.__dataframe_wrapper, render_jinja=render_jinja)
|
506
506
|
return map(mapfunc, [dataframe])
|
507
|
-
#return self.__dataframe_wrapper(wrapped_df,render_jinja)
|
508
|
-
sync_action_names:List[str] = [action.action_name for action in sync_actions]
|
509
507
|
with self._snowflake_query_lock:
|
510
508
|
dataframe = self._session.table(self._full_records_table_name) \
|
511
509
|
.filter((col("SYNC_ACTION").in_(sync_action_names)) &
|
@@ -1065,7 +1063,7 @@ def managed_outbound_processing(concurrency:int, batch_size:int):
|
|
1065
1063
|
# raise ValueError('To use the managed_outbound_processing decorator, API constraints must be defined. These can be provided in the response to the connect method')
|
1066
1064
|
logger.info(f"Batch size: {batch_size}. Concurrency: {concurrency}")
|
1067
1065
|
if len(method_args)==0:
|
1068
|
-
raise ValueError('You must provide at least one method argument, and the first argument must be a DataFrame or DataFrame generator (from outbound_sync_request.
|
1066
|
+
raise ValueError('You must provide at least one method argument, and the first argument must be a DataFrame or DataFrame generator (from outbound_sync_request.get_records)')
|
1069
1067
|
first_arg = method_args[0]
|
1070
1068
|
logger.info(first_arg.__class__.__name__)
|
1071
1069
|
if first_arg.__class__.__name__ == 'DataFrame':
|
@@ -1073,7 +1071,7 @@ def managed_outbound_processing(concurrency:int, batch_size:int):
|
|
1073
1071
|
elif hasattr(first_arg,'__next__'):
|
1074
1072
|
logger.info('managed_outbound_processing received an iterator function')
|
1075
1073
|
else:
|
1076
|
-
raise ValueError(f'The first argument to a @managed_outbound_processing method must be a DataFrame or DataFrame generator (from outbound_sync_request.
|
1074
|
+
raise ValueError(f'The first argument to a @managed_outbound_processing method must be a DataFrame or DataFrame generator (from outbound_sync_request.get_records). Instead, a {first_arg.__class__.__name__} was provided.')
|
1077
1075
|
|
1078
1076
|
# put the record iterator on the queue, ready for the first task to read it
|
1079
1077
|
fixed_size_generator = FixedSizeGenerator(first_arg,batch_size = batch_size)
|
@@ -268,7 +268,7 @@ class PluginEntrypoint():
|
|
268
268
|
except Exception as exception:
|
269
269
|
logger.error(f'Error parsing secrets content: {str(exception)}')
|
270
270
|
raise ValueError(f'Error parsing secrets content: {str(exception)}')
|
271
|
-
connection_secrets = parse_obj_as(Dict[str,StoredConfigurationValue],other_secrets)
|
271
|
+
connection_secrets = {**connection_secrets,**parse_obj_as(Dict[str,StoredConfigurationValue],other_secrets)}
|
272
272
|
return connection_secrets
|
273
273
|
|
274
274
|
def network_addresses(self,method:str,connection_parameters:Dict) -> List[str]:
|
@@ -3,11 +3,11 @@ omnata_plugin_runtime/api.py,sha256=z0yyaLq51gzP7OCJJyerCyfOXV2fY9Hhu8Qk64Q_jms,
|
|
3
3
|
omnata_plugin_runtime/configuration.py,sha256=ApmDhTG7TqURiQ5VCkfP8QY8rT5K9pQIdKi6qJurDnQ,29524
|
4
4
|
omnata_plugin_runtime/forms.py,sha256=n_OTuWL8zldCQtxqP4ZORn4Jq3mKObLEZ9bZqOrWoSE,13518
|
5
5
|
omnata_plugin_runtime/logging.py,sha256=qwJolvjKpOC0RcbP7kUQsqaS4OeMYTzdw7yacWVXKrQ,4629
|
6
|
-
omnata_plugin_runtime/omnata_plugin.py,sha256=
|
7
|
-
omnata_plugin_runtime/plugin_entrypoints.py,sha256=
|
6
|
+
omnata_plugin_runtime/omnata_plugin.py,sha256=qqir2ngJheY2ooC5WyrIbUyT8DKYxcaRjHGvURBB-e4,67464
|
7
|
+
omnata_plugin_runtime/plugin_entrypoints.py,sha256=OV2h6my2sY6B14lYJIH9Os8DAqNdxP4PV50IANdgT-c,20116
|
8
8
|
omnata_plugin_runtime/rate_limiting.py,sha256=wxjKF26cMyCRdkCdTytC-mXwJFgsMze-PJttiND9c8g,10078
|
9
9
|
omnata_plugin_runtime/record_transformer.py,sha256=oDUHurMQl6ixsltBaZf6ngPxtoizcaS21LuxKMxlaxY,2611
|
10
|
-
omnata_plugin_runtime-0.1.
|
11
|
-
omnata_plugin_runtime-0.1.
|
12
|
-
omnata_plugin_runtime-0.1.
|
13
|
-
omnata_plugin_runtime-0.1.
|
10
|
+
omnata_plugin_runtime-0.1.48.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
11
|
+
omnata_plugin_runtime-0.1.48.dist-info/METADATA,sha256=gPGr1HF0TiHNA06x3B2lylBcivDafgY6uBpaRNYbO_w,853
|
12
|
+
omnata_plugin_runtime-0.1.48.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
13
|
+
omnata_plugin_runtime-0.1.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|