-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Singer SDK Version
0.48.0
Is this a regression?
- Yes
Python Version
3.12
Bug scope
Targets (data type handling, batching, SQL object generation, etc.)
Operating System
MacOS
Description
I think this might be a regression, but I'm not 100% sure. Current behavior:
- Schema message recieved, SQLSink
setup()called on Sink instantiation. .setup()callsself.connector.prepare_table()which creates or updates the target schema. In the case ofTargetLoadMethods.OVERWRITE(new target default π¬) the destination table is dropped and recreated.- If a new schema message is received, the existing Sink instance is retired to
_sinks_to_clearand a new Sink is instantiated. This new Sink has.setup()called which triggers.setup()evolves or recreates the table using the new schema π± Records are held in_sinks_to_clearwaiting for adrain_allevent. - When
drain_allis eventually called, sinks drain in order, starting with_sinks_to_clearfirst. However the target schema has now changed (possibly multiple times), and previously received records no longer conform. In the case of the test checking for multiple schema messages any messages inserted by adrain_onetrigger will be erased when a new schema message arrives, leading to an incomplete sync π
If I am not mistaken, this means SQL targets currently don't support multiple schemas in a single stream safely π¨
Link to Slack/Linen
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels