I’m trying out the environments and I wanted to co...
# troubleshooting
m
I’m trying out the environments and I wanted to confirm that environments only allow you to
override
the existing or default config and you can’t add new ones? I was trying something like this:
Copy code
plugins:
  extractors:
  - name: tap-mysql
environments:
- name: dev
  config:
    plugins:
      extractors:
      - name: tap-mysql
        config:
          host: ${MELTANO_HOST}
          user: ${MELTANO_USER}
          database: ${MELTANO_DATABASE}
          filter_dbs: ${MELTANO_DATABASE}
          password: ${MELTANO_PASSWORD}
          port: 3307
          foo: bar
In this case it will override the “default” fields (host, port, etc), but it won’t let me add any new fields (e.g.
foo
). Am I missing something here or is this expected behavior. My staging environment requires config that can’t be present in the prod env. (I was using this as a guide — I’m aware of the bug in that particular line fwiw)
t
The docs indicate you should be able to add or override config https://meltano.com/docs/environments.html#inheritance trying using
config
and
list
within and environment to see what you get https://meltano.com/docs/command-line-interface.html#using-config-with-environments
m
Ok. Cool. I'll try playing around with it some more. I was using inheritance before without environments but I was trying to avoid the multiple installs of the tap venv that come with inheritance. Thanks. Just wanted to make sure I wasn't missing something obvious
p
Also you can checkout https://gitlab.com/meltano/squared/-/blob/master/data/meltano.yml and https://gitlab.com/meltano/squared/-/blob/master/data/environments.meltano.yml as an example of how we use environments in our meltano instance, that might be helpful too