Hi there, I’m trying to add a way to persist state...
# plugins-general
j
Hi there, I’m trying to add a way to persist state to S3 and I can confirm that
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
are set as environment variables yet I still get:
Copy code
[warning ] Unable to persist state, or received state is invalid, incremental state has not been updated
the state that I have does seem strange in that it is just empty curly braces:
Copy code
[info ] Emitting completed target state {"bookmarks": {"public-settlements_fee": {}, ...
For reference I have the setup of
tap-postgres
and
target-redshift
. Any ideas on how to triage this?
m
I’m new to Meltano, but I made this work and my state is getting persisted. I suppose you have set
MELTANO_STATE_BACKEND_URI
to tell it where to store the state, right? Also, are you certain the user you use has the required access to store files to the bucket? If none of these helps, I found very useful the
--log-level=debug
option for the
meltano
CLI:
Copy code
meltano --log-level=debug ...
j
ah nice. I actually figured it out with a similar way setting
export MELTANO_CLI_LOG_LEVEL=debug
and getting the logs as well. It turned out to be an S3 permissions issue at one point and not installing the right meltano package. For S3 state you need
meltano[s3]
. I didn’t realize it was a separate package to install
m
Strange. It worked for me without installing additional packages - just set the MELTANO_STATE_BACKEND_URI to be an S3 and the file appeared for me.