Andy Carter
03/09/2023, 1:55 PMreplication_method is not specified for a stream, is INCREMENTAL the default?
• When setting FULL_TABLE, it looks like singer/meltano can actually figure out what the primary_keys should be? Is that right? I'm not setting a PK in python code or meltano.yaml for this stream, but the DDL shows the sql PK as ('context', 'id') which is correct for my table.pat_nadolny
03/09/2023, 4:11 PMAndy Carter
03/09/2023, 7:45 PMtap-instagram loaderpat_nadolny
03/09/2023, 8:05 PM• IfIt depends on the tap implementation. The tap developer gets to define the default behavior. This one is an SDK based tap so these docs are helpful https://sdk.meltano.com/en/latest/incremental_replication.html#example-code-timestamp-based-incremental-replication. Basically if the tap defines a replication key (e.g. the media stream) then it will try to run in incremental mode, and if its run by meltano then it will have state saved between syncs. Optionally this can be overidden a few different ways but using theis not specified for a stream, isreplication_methodthe default?INCREMENTAL
--full-refresh flag for run would ignore state.
• When settingYep similarly the tap developer can set the primary keys for a stream e.g. see the media stream again. Some source systems/APIs have static PKs so the tap developer defines them in the tap whereas others like tap-csv the PKs are set as config values since everyone's CSV files are different., it looks like singer/meltano can actually figure out what theFULL_TABLEshould be? Is that right? I'm not setting a PK in python code or meltano.yaml for this stream, but the DDL shows the sql PK as ('context', 'id') which is correct for my table.primary_keys
Andy Carter
03/10/2023, 8:47 AMreplication_key is set then the bevahiour is INCREMENTAL even if not explicitly stated.
On the second point of primary keys, I cannot see anywhere even in the tap repo where the PK for the stream is defined, yet in the resulting sql database the PK results as ('id', 'context') which is appropriate for the stream. I'm just curious as to how that could happen, I'm probably missing something simple though, I'll keep looking this side.