Hello everyone, I just want to confirm whether the...
# troubleshooting
m
Hello everyone, I just want to confirm whether the following is expected behavior when using Meltano. I have the
target-snowflake
plugin defined in the
meltano.yml
file:
Copy code
- name: target-snowflake
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/target-snowflake.git>
    config:
      database: DATABASE_NAME1
      ...
However, when I try to override the
database
config by running:
Copy code
meltano config target-snowflake set database DATABASE_NAME2
…it doesn’t take effect. For the override to work, I need to first remove the
database
configuration from the `meltano.yml`file. Is this the intended behavior?
e
Those commands do work on a fresh project:
Copy code
$ meltano init --no-usage-stats _config_set
...
$ cd _config_set
$ meltano add target-snowflake
...
$ meltano config target-snowflake set database DATABASE_NAME1
Loader 'target-snowflake' setting 'database' was set in `meltano.yml`: 'DATABASE_NAME1'
$ cat meltano.yml
version: 1
default_environment: dev
project_id: 8de41841-c121-455f-a27c-7ccefc682700
environments:
- name: dev
- name: staging
- name: prod
send_anonymous_usage_stats: false
plugins:
  loaders:
  - name: target-snowflake
    variant: meltanolabs
    pip_url: meltanolabs-target-snowflake
    config:
      database: DATABASE_NAME1
$ meltano config target-snowflake set database DATABASE_NAME2
Loader 'target-snowflake' setting 'database' was set in `meltano.yml`: 'DATABASE_NAME2'
$ cat meltano.yml
version: 1
default_environment: dev
project_id: 8de41841-c121-455f-a27c-7ccefc682700
environments:
- name: dev
- name: staging
- name: prod
send_anonymous_usage_stats: false
plugins:
  loaders:
  - name: target-snowflake
    variant: meltanolabs
    pip_url: meltanolabs-target-snowflake
    config:
      database: DATABASE_NAME2
m
Thank you @Edgar Ramírez (Arch.dev) for your response. In my setup, I configure everything right before running a Meltano job. Each job is used to ingest a single table.
Copy code
meltano select tap-postgres public-table1 && meltano config tap-postgres set sqlalchemy_url <postgresql://meltano>:******@rds.amazonaws.com:5432/db && meltano config tap-postgres set filter_schemas ['"public"'] && meltano config tap-postgres set _metadata '*' replication-method INCREMENTAL && meltano config tap-postgres set _metadata '*' replication-key updated_at && meltano config target-snowflake set validate_records False && meltano config target-snowflake set database DB1 && meltano config target-snowflake set default_target_schema SCHEMA1 && meltano config target-snowflake set account accountname && meltano config target-snowflake set password ****** && meltano --environment=prod run --database-uri=<postgresql://meltano>:******@rds.amazonaws.com:5432/meltano --state-id-suffix=public-table1 tap-postgres target-snowflake
and in this way, if the database is configured in
meltano.yml
, it won’t be overwritten.