I'm struggling to figure out how to set the `state...
# getting-started
h
I'm struggling to figure out how to set the
state_backend
uniquely per environment. for instance, this works:
Copy code
version: 1
project_id: blah
default_environment: dev
state_backend:
  uri: 'file:///${MELTANO_SYS_DIR_ROOT}/state'
I expecte the following to work, but this does not:
Copy code
version: 1
project_id: blah
default_environment: dev
environments:
  - name: dev
    config:
      state_backend:
        uri: 'file:///${MELTANO_SYS_DIR_ROOT}/state'
1
l
I solved this by setting the backend to a env variable like this
Copy code
state_backend:
  uri: $MELTANO_STATE_BUCKET
so when I develop and want to run locally I set it to
file:///project/$state_dir
and in production I set it to
<gs://meltano-state-bucket>
👍 1
h
yeah, i have a similar solution as well, but i find this less explicit than having it be specified in the meltano.yml file.
e
Project-level settings are not supported at the environment level, unfortunately. Do log an issue if you really need it, though.
h
I see, I think I'll create an issue to improve the documentation to highlight this limitation, and take it on myself 🙂
🙌 1