Hi all, I just wanted to know that in transformati...
# announcements
a
Hi all, I just wanted to know that in transformation while create models can we specify a composite primary key or not and if yes can anyone tell me how?
y
Meltano uses dbt for the Transformations. You can check their documentation on that subject https://docs.getdbt.com/docs/introduction
a
Hey one more thing does meltano supports incremental extraction and loading? or it just load the whole data?
y
Meltano supports incremental extraction for all extractors that have that feature. This is done behind the scenes as long as you run the same pipeline or schedule a pipeline to run in regular intervals
a
So, what is the method on the backend does it store the timestamp or by the primary key?
y
1. Check whether the postgres extractor you are using is supporting STATEs 2. If it supporting STATEs. set your postgres extractor to have a
state
capability Check how we define extractors in our
discovery.yml
file https://www.meltano.com/discovery.yml
We are agnostic to how states work. If an extractor supports states, we just store them and provide them to the extractor whenever a job runs with the same job id
Also, if you are using the CLI, don't forget to run your elt with the same job_id
Copy code
meltano elt tap-postgres target-postgres --transform run --job_id MY_JOB
But the postgres extractor is a little bit weird so it may not support incremental extraction and states out of the box
This is an extractor that we do not officially support, so I am not sure of how it behaves on that respect
You'll have to check the Tap, make it work by itself and use that knowledge to set it up in your discovery
a
Thanks for the help.
y
You are welcome 🙂