Samuel Nogueira Farrus
01/14/2025, 11:38 AMSamuel Nogueira Farrus
01/15/2025, 8:07 PMEdgar Ramírez (Arch.dev)
01/16/2025, 7:09 PMSamuel Nogueira Farrus
01/16/2025, 7:36 PMdbt-postgres
transform with the following content:
{{
config(
pre_hook='truncate <schema>.<table>',
post_hook='drop view <schema>.<transform_sql_file_name>'
)
}}
select now()
and then set a commands
in the meltano.yml
:
commands:
truncate:
args: run --select models/<truncate_file>.sql
transform:
args: run --exclude models/<truncate_file>.sql
So I run the ELT with:
meltano run dbt-postgres:truncate <extractor> target-postgres dbt-postgres:transform
There you go, the target table is emptied before the insertion of new dataEdgar Ramírez (Arch.dev)
01/16/2025, 7:38 PM