Hi, I had to create a fork of `tap-mongod` to do s...
# plugins-general
h
Hi, I had to create a fork of
tap-mongod
to do some changes (discussed here) and I think I’m going some where now. I have successfully ‘migrate’ to
target-postgres
! Just q quick, and newbie question, why every time I re-lunch a new elt it creates new tables in the target? I was expecting that only new records would update…
Copy code
INFO Writing table batch with 109885 rows for `('Order__1616169900637',)`...
a
I’m not sure if I follow. When you mention it creating new tables, are those temporary/interim load tables by chance? Does the data eventually also land in the “main” set of tables?
h
@aaronsteers hi, the tables, are created in the pg schema (i.e: order table). Running a second time, I see new tables like ‘order_<timestamp>’.
If I drop all tables, I get ‘order’ without the timestamp once again
a
Can you tell if the rows from the second ‘order_<timestamp>’ table also get replicated into ‘order’. Sounds like there could be a cleanup step missing.
h
@aaronsteers ok, I’ll try to get that information later. thanks
a
Some taps - on subsequent imports - do have a behavior to first load a new table with the new dataset, then merge or insert back into the main table - but then afterwards they should clean themselves up by deleting the timestamped table.
h
in case of an error, they clean the temp tables?
a
I would have to check the target code to be sure, but in most cases I’ve seen the interim table dropped if all is successful. If the load fails for any reason, that timestamped table might be retained for debugging purposes. Again, depends on the specific target’s approach.
h
OK, I was doing a quick test, and It seams that it’s reaplying all the records, not sure why , maybe the problem it’s the source tap