SIENTIAPDE-1712

Add unique constraint on (model_id, timestamp, variable) in schema and implement idempotent export test to ensure no duplicates are created. Update CoreScouter and related tests to handle conflict resolution by ignoring duplicates.
This commit is contained in:
vitor-aignosi
2026-03-24 11:34:57 -03:00
parent 909ad25b63
commit d7cd9043b2
6 changed files with 1013 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ async def test_core_scouter_workflow_success(mock_workflow, core_scouter):
'schema': 'test_schema',
'table_name': 'test_table',
'data': 'held_data',
'on_conflict': 'ignore',
'timestamp_conversion': {
'column': 'timestamp',
'format': DATETIME_FORMAT_WITH_TZ,
@@ -299,6 +300,7 @@ async def test_core_scouter_workflow_with_zero_affected_rows(mock_workflow, core
'schema': 'test_schema',
'table_name': 'test_table',
'data': 'held_data',
'on_conflict': 'ignore',
'timestamp_conversion': {
'column': 'timestamp',
'format': DATETIME_FORMAT_WITH_TZ,
@@ -369,6 +371,7 @@ async def test_core_scouter_workflow_without_debug_data_package(mock_workflow, c
'schema': 'test_schema',
'table_name': 'test_table',
'data': 'held_data',
'on_conflict': 'ignore',
'timestamp_conversion': {
'column': 'timestamp',
'format': DATETIME_FORMAT_WITH_TZ,