haleemur_ali
09/11/2024, 4:34 PMmeltano el --environment=test tap-snowflake target-db2
this results in state files with the following format & each time the meltano job is launched, a new state file is written, where the timestamp at the front corresponds to when the job was launched:
yyyy-mm-ddThhmmss--tap-snowflake--target-db2/state.json
and inspecting the logs, it seems each on each run, meltano is looking for a statefile with the launch time, eg.
No state found for 2024-09-11T155644--tap-snowflake--target-db2
To get around this, I've updated the container command to
meltano el --environment=test tap-snowflake target-db2 --state-id=tap-snowflake--target-db2
However, I am wondering if there is a more elegant way to specify the state-id. Also, does this feel like a bug or is this expected but not clearly documented?
when running locally, the state is saved to a location that includes the environment, tap and target names, e.g.
dev:tap-snowflake-to-target-db2/state.json
Edgar Ramírez (Arch.dev)
09/11/2024, 5:30 PM--state-id
(prev. --job_id
) argument is as old as Meltano and IIUC it's there to make incremental replication an opt-in behavior.
However, I am wondering if there is a more elegant way to specify the state-id.There's the
MELTANO_STATE_ID
env var, but that may also be inelegant.
Also, does this feel like a bug or is this expected but not clearly documented?It's expected. There's documentation: • https://docs.meltano.com/guide/troubleshooting/#incremental-replication-not-running-as-expected • https://docs.meltano.com/guide/integration/#incremental-replication-state Though of course documentation amendments and additions in places where they make the most sense for a newcomer are always welcome 😃.
when running locally, the state is saved to a location that includes the environment, tap and target names, e.g.
I may be wrong, but this seems to be usingCopy codedev:tap-snowflake-to-target-db2/state.json
meltano run
instead?haleemur_ali
09/11/2024, 5:53 PM