From 62e7a7dee987904e5ce4367578a1b9dc1a890aee Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Wed, 19 Nov 2025 08:12:08 -0300 Subject: [PATCH] SIENTIAPDE-1273 SIENTIAPDE-1273 Add 'save_transform' and 'transform_table_name' parameters to predictions_batch function for enhanced data processing capabilities. Update corresponding test cases to reflect these changes. --- orchestrator/utils/orchestrator_functions.py | 2 ++ tests/orchestrator/utils/test_orchestrator_functions.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/orchestrator/utils/orchestrator_functions.py b/orchestrator/utils/orchestrator_functions.py index ac50f32..b8e7eec 100644 --- a/orchestrator/utils/orchestrator_functions.py +++ b/orchestrator/utils/orchestrator_functions.py @@ -248,6 +248,8 @@ def predictions_batch(config: dict[str, Any]): 'datetime_columns': config.get('datetime_columns', []), 'schema': 'sientia_data', 'table_name': 'predictions', + 'save_transform': config.get('save_transform', True), + 'transform_table_name': 'transformed_data', 'retention_time': config.get('model_retention_minutes', 60) * 60, 'opc_output_config': tags, 'input_filters': overlap_filter_config( diff --git a/tests/orchestrator/utils/test_orchestrator_functions.py b/tests/orchestrator/utils/test_orchestrator_functions.py index 4dc9666..4db42a8 100644 --- a/tests/orchestrator/utils/test_orchestrator_functions.py +++ b/tests/orchestrator/utils/test_orchestrator_functions.py @@ -238,6 +238,8 @@ def test_predictions_batch(mock_process_path_priority, mock_overlap_filter_confi 'query': 'test_query', 'schema': 'sientia_data', 'table_name': 'predictions', + 'save_transform': True, + 'transform_table_name': 'transformed_data', 'retention_time': 60 * 60, 'opc_output_config': { 'test_server_id': {