-
Notifications
You must be signed in to change notification settings - Fork 100
Cannot add more tables to existing postgres->snowflake log based extract #107
Comments
Running into the same problem using Meltano. |
I found this using Meltano as well, I opened #130 to fix it |
@deanmorin Do the changes in #144 fix your issue too? If so, I believe, that solution is a bit neater and also fixes another issue around |
@judahrand I'm swamped at the moment, but I'll try that out when I get a chance. |
@judahrand I agree that yours is a much better solution. |
Hey there! @judahrand @Samira-El. I see the fix for this problem is almost done in this PR. Can I give this a +1? I'm hitting this issue at the moment! |
I'm afraid I don't think I'll get to updating that PR anytime soon I'm afraid. Feel free to update it and re-open the PR, however. |
Running into the same issue using Meltano! Manually adding the new tables to the state files is the temporary fix I found for this bug. |
josescuderoh's solution (#219) patched into 2.1.0 version works well for me |
Describe the bug
I'm using log based replication with:
Initially I selected just a few tables in postgres. This worked as expected. Later, I tried to select more of the postgres tables. When I did this, it did a full table sync (
logical_initial
) for the new tables, which was expected. However, the state for these new tables is not emitted, and every time I run after that, it once again does a full table sync. The new tables never use log based replication.I found this bug when running using meltano, but confirmed it using a standalone singer job.
To Reproduce
Steps to reproduce the behavior:
Create a test postgres database with a couple of tables:
Create config files for the tap and target, for example:
tap_config.json
target_config.json
Install the tap and create
catalog.json
Install the target
Do the initial run
Second run to show that "public-a" is now using log based replication
Add a new table to the selected tables and run again
You'll see this in the logs:
Later, the target will show the expected state:
However, then it moves on to reading from the replication slot for the existing table(s). After that's done, the state has "lost" the new table:
Unfortunately, this is the state that gets emitted:
Because of this, the next time you run, it'll start with the "logical_initial" full table sync again for the new table, and every time you run after that as well.
Expected behavior
The state for
public-b
should be emitted by the target.Screenshots
If applicable, add screenshots to help explain your problem.
Your environment
Additional context
From this slack thread, it sounds like this may not be encountered when running using pipelinewise, since "FastSync" is used for the initial sync.
The text was updated successfully, but these errors were encountered: