Hey, is there a way to tell Meltano targets (in my...
# best-practices
n
Hey, is there a way to tell Meltano targets (in my example Postgres) to always truncate the destination table before starting a new import?
v
Activate version is the closest thing right now. It deletes after
p
@nico_berchtold heres a summary of the activate version mechanism https://hub.meltano.com/singer/docs#activate-version. You could also just run a full refresh every time and use dbt to stage only the latest synced batch
n
Great, thank you guys!
m
The pipelinewise Postgres target doesn't support this does it? I'm implementing something similar in Airflow but I'd love to handle it all in the tap and target if possible.
n
@matt_cooley what about a Truncate Script and just call it by the tap?
v
doing a transformation after can also work!
m
The backfill takes a while so I’m trying to avoid truncating, but I have an airflow dag that starts with a task that gets the “start_time”. So it’s a solved problem on my end, I was just wondering if I could use
activate_version
instead. Sounds like that’s a no since the target doesn’t support it. No worries. Thanks!