Hi all, having a general question about using Airbyte + DBT, wondering what's the best practice for it.
1. I have a stream that syncs product information in FULL_REFRESH mode from source and APPEND the latest records to a destination table. So the destination table contains snapshots of the product info at different timestamps.
2. A downstream DBT transformation is set up to always fetch the latest snapshot of the product info, clean it and load it to another table that only keeps the latest snapshot.
Right now, I am using a MACRO function in dbt to query the product destination table to get the max value of
_airbyte_emitted_at
, so all downstream cleaning operations can use it as a filter to only get the latest snapshot records.
I am wondering if it is possible that I can pass the
_airbyte_emitted_at
as a variable from Airbyte to DBT from CLI to tell the transformation which snapshot it is going to operate on? If this is possible, it will be more friendly to rerun "backfill" jobs from DBT (since the snapshot is passed in as an argument)