My dotenv doesn't seem to be getting set in my con...
# troubleshooting
v
My dotenv doesn't seem to be getting set in my config.json. Is that normal? I see from debugging that it's set as an environment variable. hmm
{'host': 'localhost', 'port': 1433, 'database': 'master', 'user': 'sa'} is the config.json sent to my target (printing it out currently) From a debug run of meltano invoke [DEBUG] Env: {'TARGET_MSSQL_PASSWORD': is set and that matches the prefix of the target keys that are getting passed to my target (host, user, etc)
This is my first time using dotenv's with meltano so I could just be way off with my expectations here. I set the dotenv using
meltano config
d
@visch This has the same cause as what I described in https://gitlab.com/meltano/meltano/-/issues/2723#note_559060858:
env vars can only be used once a setting is known to Meltano, which requires the setting the either explicitly defined under
settings
in
meltano.yml
, or for it to have been added as custom setting under
config
. You'll see that after storing with
--store=meltano_yml
, storing another value with
--store=dotenv
will work because the custom setting is now known.
In your case, Meltano doesn't know yet about target-mssql's
password
setting, so it's not going to be looking for that env var yet