omnata-plugin-runtime 0.5.8a158__tar.gz → 0.5.9__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/omnata_plugin.py +23 -5
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/LICENSE +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/README.md +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -2426,10 +2426,19 @@ def find_udtf_classes(path:str = '.') -> List[UDTFDefinition]:
|
|
2426
2426
|
handler=obj.__module__+'.'+obj.__name__
|
2427
2427
|
))
|
2428
2428
|
# java doesn't use the python decorator, so we need to check for the class directly
|
2429
|
-
for name, obj in inspect.getmembers(module
|
2429
|
+
for name, obj in inspect.getmembers(module):
|
2430
2430
|
# Check if the class has the specified attribute
|
2431
2431
|
if isinstance(obj, UDTFDefinition) and cast(UDTFDefinition,obj).language == 'java':
|
2432
|
-
|
2432
|
+
udtf_obj = cast(UDTFDefinition,obj)
|
2433
|
+
if udtf_obj.language == 'java':
|
2434
|
+
# because the decorator wasn't used, we need to check if we need to add the connection_parameters parameter
|
2435
|
+
if udtf_obj.expose_to_consumer:
|
2436
|
+
if len(udtf_obj.params) == 0 or udtf_obj.params[0].name.upper() != 'CONNECTION_PARAMETERS':
|
2437
|
+
udtf_obj.params = [SnowflakeFunctionParameter(
|
2438
|
+
name='CONNECTION_PARAMETERS',
|
2439
|
+
data_type='OBJECT',
|
2440
|
+
description='The connection object, obtained from calling PLUGIN.PLUGIN_CONNECTION.')] + udtf_obj.params
|
2441
|
+
matching_classes.append(udtf_obj)
|
2433
2442
|
|
2434
2443
|
return matching_classes
|
2435
2444
|
|
@@ -2533,9 +2542,18 @@ def find_udf_functions(path:str = '.') -> List[UDFDefinition]:
|
|
2533
2542
|
handler=obj.__module__+'.'+obj.__name__
|
2534
2543
|
))
|
2535
2544
|
# java doesn't use the python decorator, so we need to check for the class directly
|
2536
|
-
for name, obj in inspect.getmembers(module
|
2545
|
+
for name, obj in inspect.getmembers(module):
|
2537
2546
|
# Check if the class has the specified attribute
|
2538
|
-
if isinstance(obj, UDFDefinition)
|
2539
|
-
|
2547
|
+
if isinstance(obj, UDFDefinition):
|
2548
|
+
udf_obj = cast(UDFDefinition,obj)
|
2549
|
+
if udf_obj.language == 'java':
|
2550
|
+
# because the decorator wasn't used, we need to check if we need to add the connection_parameters parameter
|
2551
|
+
if udf_obj.expose_to_consumer:
|
2552
|
+
if len(udf_obj.params) == 0 or udf_obj.params[0].name.upper() != 'CONNECTION_PARAMETERS':
|
2553
|
+
udf_obj.params = [SnowflakeFunctionParameter(
|
2554
|
+
name='CONNECTION_PARAMETERS',
|
2555
|
+
data_type='OBJECT',
|
2556
|
+
description='The connection object, obtained from calling PLUGIN.PLUGIN_CONNECTION.')] + udf_obj.params
|
2557
|
+
matching_classes.append(udf_obj)
|
2540
2558
|
|
2541
2559
|
return matching_classes
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/forms.py
RENAMED
File without changes
|
{omnata_plugin_runtime-0.5.8a158 → omnata_plugin_runtime-0.5.9}/src/omnata_plugin_runtime/logging.py
RENAMED
File without changes
|
File without changes
|
File without changes
|