Greetings (again)! Is there a way to set different...
# random
s
Greetings (again)! Is there a way to set different
.env
variables according to environments?? My case: I have two environments named
prod1
and
prod2
and my
target-postgres
credentials are different for each, so I would like to have them both at the
.env
file and switch according to the environment, if possible (also, I do accept workarounds and bypasses).
1
Nevermind, I figured that out.
e
You could refer to custom env vars in
meltano.yml
and set them in `.env`:
Copy code
environments:
- name: dev
  config:
    plugins:
      loaders:
      - name: target-postgres
        config:
          host: $POSTGRES_DEV

- name: prod
  config:
    plugins:
      loaders:
      - name: target-postgres
        config:
          host: $POSTGRES_PROD
plugins:
  loaders:
  - name: target-postgres
Does https://github.com/meltano/meltano/issues/3447 describe your use case?
🙏 1
Nevermind, I figured that out.
Oh, cool 😅
s
I FIGURED THAT OUT LIKE SECONDS BEFORE YOU ANSWER hahahaha I did exactly that and worked like a charm. Thank you anyway!
🙌 1
a
If you use vscode I find this extension helpful too: https://marketplace.visualstudio.com/items?itemName=EcksDy.env-switcher