silverbullet1
07/06/2023, 2:01 PMmeltano.yml
, my code is not able to read them. Do I need to explicitly read from os.environ
or is it handled by default in the SDK ?
My code is breaking at the point where I am forming the sql_alchemy connection string / validating input parameters.
url = URL.create(
drivername='redshift+redshift_connector', # indicate redshift_connector driver and dialect will be used
host=self.config['host'], # Amazon Redshift host
port=self.config['port'], # Amazon Redshift port
database=self.config['database'], # Amazon Redshift database
username=self.config['user'], # Amazon Redshift username
password=self.config['password'] # Amazon Redshift password
)
It tries to find user and pass in self.config
and gives KeyError
. My env vars are TAP_REDSHIFT_USER
and `TAP_REDSHIFT_PASSWORD`and they have been specified in my meltano.yml
like this:
default_environment: test
environments:
- name: test
env:
TAP_REDSHIFT_USER: foo
TAP_REDSHIFT_PASSWORD: bar
Do I have to map these keys with env vars somewhere? I tried to find it in existing implementations but couldn’t find.