Hi, I am struggling to work out how to configure a...
# troubleshooting
s
Hi, I am struggling to work out how to configure a list of values for a TAP configuration in an environment variable. I can successfully configure my list of primary_keys in my meltano.yml (See picture). However when I try to configure via environment variables in the .env I'm not sure how to specify a list of values - my example configuration does not work. Could someone please explain how would we could configure lists via an Environment Variable? Thanks Steve
e
Hi @steve_clarke! The syntax for an array is a single-quoted json array. So
Copy code
TAP_REST_API_MSDK__EXAMPLE_PRIMARY_KEYS='["CampusId"]'
s
Thanks @edgar_ramirez_mondragon, I have tried this and unfortunately it is failing when I run the TAP. Note: I am using Meltano version 1.87.1 (maybe this is fixed?). The TAP works fine when I define the Primary Keys in the meltano.yml but doesn't work when I use the Environment Variable definition. When I run
Copy code
meltano config tap-rest-api-msdk--CHRISHEALTH list
Results from .env
Copy code
primary_keys [env: TAP_REST_API_MSDK__CHRISHEALTH_PRIMARY_KEYS] current value: '["CampusId"]' (from `.env`)
Results from meltano.yml
Copy code
primary_keys [env: TAP_REST_API_MSDK__CHRISHEALTH_PRIMARY_KEYS] current value: ['CampusId'] (from `meltano.yml`)
e
ah, so you're missing
kind: array
Copy code
settings:
- name: primary_keys
  kind: array
that way Meltano knows how to parse it
s
LOL, super cool - Thanks Edgar. I will give that a go now.
That did the trick, thank you so much @edgar_ramirez_mondragon. 👏
e
Glad that worked!