Hi! I was having trouble using environment variabl...
# troubleshooting
a
Hi! I was having trouble using environment variables in the
meltano.yml
file, and it seems they are only supported for top-level configuration options. If I define
SOME_ENV_VAR=SOME_VALUE
in
.env
and I write this configuration yaml:
Copy code
plugins:
  extractors:
    - name: tap-spreadsheets-anywhere
      variant: ets
      pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
      config:
        test: $SOME_ENV_VAR
        tables:
          - path: $SOME_ENV_VAR
            name: my_table
The following configuration is actually used by meltano:
Copy code
$ meltano config tap-spreadsheets-anywhere
{
  "tables": [
    {
      "path": "$SOME_ENV_VAR",
      "name": "my_table"
    }
  ],
  "test": "SOME_VALUE"
}
And the
tables.path
variable is not set. It would be useful to be able to define the data path depending on the environment, am I doing something wrong here or should I create an issue? Thanks!
e
Hi @alex. You're correct, nested values in
array
settings don't have environment variables expanded. So, please do file an issue https://gitlab.com/meltano/meltano/-/issues/new?issue 🙂
r
@alex Did you ever figure out how to resolve this issue?
a
Hi @robert_espinoza! No sorry, I filed this issue: https://github.com/meltano/meltano/issues/3171 But I did not have time to investigate/propose a fix, I simply avoided using env variables inside the
tables
setting