collin_prather
03/02/2024, 6:46 PMmeltano run tap-sleeper target-duckdb
, it all works flawlessly. On subsequent runs, however, I get the following error: ValueError: State file contains duplicate entries for partition: {state_partition_context}
, where the matching state values are
[
{
"context": {
"current_week": 0,
"current_season": "2024",
"league_id": "<league_id>",
"max_week": 17,
"replication_week": 17,
}
},
{
"context": {
"current_week": 0,
"current_season": "2024",
"league_id": "<league_id>",
"max_week": 17,
"replication_week": 17,
},
"starting_replication_value": None,
},
]
The issue seems to be with starting_replication_value
🤔 Anyone know how to fix this?Edgar RamÃrez (Arch.dev)
03/04/2024, 5:39 PMleague_id
different between those two context dictionaries?collin_prather
03/04/2024, 6:32 PMleague_id
is the same in both context dictionaries. Apologies, I should have made that clearer in my description!Edgar RamÃrez (Arch.dev)
03/04/2024, 6:42 PMEdgar RamÃrez (Arch.dev)
03/04/2024, 6:44 PMcollin_prather
03/04/2024, 7:15 PMThere may be a missing identifier that needs to come from the parent classI'm fairly confident this is user-error, since I created the tap, I'm using parent/child streams, and relying pretty heavily on
context
. I'll take a closer look at adding parent identifiers to the child stream. Thanks!collin_prather
03/05/2024, 4:38 PMEdgar RamÃrez (Arch.dev)
03/05/2024, 8:14 PMI need to add an identifier from the parent context to each row in the child stream?rather add a parent ID to the context, but I see you're already passing
league_id
from from LeagueStream
so it makes me think that the league
stream is syncing some records twice. Could you share the complete state generated on the first run?Edgar RamÃrez (Arch.dev)
03/05/2024, 8:20 PMcollin_prather
03/05/2024, 9:40 PMleague
stream a bit closer to exhaustively verify that it is not syncing some records twice. If I'm still having trouble, I'll share the state with you. Thank you!