Hi All I am getting error : Environment 'dev' was ...
# troubleshooting
s
Hi All I am getting error : Environment 'dev' was not found For command: docker run --rm -v $(pwd):/projects -w /projects -p 5050:5000 meltano/meltano install Previously this was working properly suddenly giving this error
e
HI @shailesh. What does your
meltano.yml
look like?
s
Resolved issue by downgrading to lower version of meltano
Thanks @edgar_ramirez_mondragon for looking at the issue.
e
Np @shailesh. This is most likely related to #6582 and I guess your project doesn’t declare any environments.
a
@shailesh - Thanks for reporting, and @edgar_ramirez_mondragon thanks for logging!
n
Hello guys, could you please give me a hint how the
meltano.yml
should look like if i don’t need an environment?
a
@nadiia_kotelnikova - I might be missing some context from your question. I've added to the issue a couple options of a workaround if you don't want to use an environment. You can add a
dev
environment with no settings overrides using
meltano environment add dev
. Or if you don't want to change meltano.yml at all, you should be able to use
--no-environment
in the command line to explicitly ignore the pre-programmed default.
Does this help at all?
n
Hi @aaronsteers thank you for you answer. I have tested the fist option and it works. I just had a concern if i can leave my current configuration outside any env and have just one dev env without settings. The second option unfortunately does not work for me, as my container is failing on build stage, because
meltano install
does not have
--no-environment
option and can not solve the issue.
Is this structure of
meltano.yml
is acceptable?
Copy code
version: 1
send_anonymous_usage_stats: false
project_id: 02d112a8-f925-4448-a962-b1411cd3b301
environments:
  - name: dev
    config:
      plugins:
        extractors:
          - name: tap-github
            config:
              organizations: [MeltanoLabs]
            select: ["repositories.*"]
        loaders:
          - name: target-snowflake
            config:
              dbname: dev
              warehouse: dev_wh
              batch_size_rows: 1000

plugins:
  orchestrators:
    - name: airflow
      pip_url: psycopg2-binary apache-airflow==2.3.3 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-${MELTANO__PYTHON_VERSION}.txt>

  files:
    - name: airflow
      pip_url: git+<https://github.com/meltano/files-airflow.git>

  extractors:
    - name: tap-postgres
      variant: transferwise
      settings:
        - name: filter_schemas
          value: public
        - name: default_replication_method
          value: FULL_TABLE
        - name: ssl
          value: true
The example of dev env were taken from the Meltano docs. I can see the
config
section there. Should it be changed to
settings
same way i did in no-environment config section?
a
Hi, @nadiia_kotelnikova. You can override as much or as little into the dev environment declaration as you need to, but the top-level
plugins
definition should still be the primary reference for all the plugins in your project.
You may need to add back
target-snowflake
and
tap-github
under plugins, as I don't see them there as of now. (Or if this is just the top of the file and those are still listed, you can disregard this point. 🙂)
A general practice is to keep all of your config under the main
plugins
entry (just as before) and override just those components you may want to tweak for a specific execution context (prod, dev, localtest, etc). Hope this helps!
n
A general practice is to keep all of your config under the main
plugins
entry (just as before) and override just those components you may want to tweak for a specific execution context (prod, dev, localtest, etc).
Hope this helps!
Thanks @aaronsteers this explains a lot!