i want to pass in environment variables into `melt...
# troubleshooting
k
i want to pass in environment variables into `meltano.yml`something like this:
Copy code
- name: tap-postgres
        config:
          host: localhost
          user: ${PGUSER}
          port: ${PGPORT}
          password: ${PGPASSWORD}
          database: ${PGDATABASE}
i can confirm that these env variables are set when i run
env
, but when i run
meltano config tap-postgres test
it doesn't appear to have set these values:
Copy code
File "/meltano-project/.meltano/extractors/tap-postgres/venv/lib/pionError: Need either the sqlalchemy_url to be set or host, port, user, and password to be set
is there something else i can do to determine why these variables are not getting set? in general, im finding it difficult to debug and understand what meltano is doing under the hood when i get into situations like these
1
e
Hey @Kenny Ning! This seems like a bug. I'll try to reproduce tomorrow. Thanks for reporting! :)
1
k
i think the issue was just my meltano.yml was a little messed up, its looking i can connect now 🤞
e
Awesome, so I'm curious what changes you had to do to
meltano.yml
k
i got into some weird state where multiple configurations of the same plugin were in my
meltano.yml
, maybe using the interactive config setting weirdly? hard to reproduce 😞
e
Thanks anyway @Kenny Ning. I can indeed confirm that something like this
Copy code
environments:
- name: dev
  config:
    plugins:
      extractors:
        - name: tap-smoke-test
          config:
            streams:
            - input_filename: "<https://gitlab.com/meltano/tap-smoke-test/-/raw/main/demo-data/animals-data.jsonl>"
              stream_name: animals
- name: staging
- name: prod
send_anonymous_usage_stats: false
plugins:
  extractors:
  - name: tap-smoke-test
    variant: meltano
    pip_url: git+<https://github.com/meltano/tap-smoke-test.git>
does work well with
meltano@py311 --environment=dev config tap-smoke-test test