christopher_kintzel
12/06/2022, 2:37 PMdbt-postgres
transformer to my existing project with meltano add transformer dbt-postgres
. This added a new section in my meltano.yml
and created a bunch of files in the transform directory. I have created a custom source.yml
and my_new_table.sql
within ./transform/models/<my_project_name>
. I can successfully execute those by running meltano run dbt-postgres:run
or meltano invoke dbt-postgres:run
locally, but am failing to run them as part of my schedules.
a. I tried enabling it by setting transform: run
within a schedule. The schedule now fails with this error: {"error": "Plugin 'Transformer 'dbt' not found.\nUse of the legacy 'dbt' Transformer is deprecated in favor of new adapter specific implementations (e.g. 'dbt-snowflake') compatible with the 'meltano run ...' command.\n<https://docs.meltano.com/guide/transformation>\nTo continue using the legacy 'dbt' Transformer, add it to your Project using 'meltano add transformer dbt'.' is not known to Meltano"}
, but I have not added the dbt
plugin, only dbt-postgres
b. How can I specify which transformer plugin to run within a schedule. I only find the option to set it to run
, skip
, only
? I would like to run different transformers on different schedules.
Thank you!Sven Balnojan
12/06/2022, 2:46 PMpat_nadolny
12/06/2022, 3:24 PMtransformers
plugins (only dbt as of today) to manage your data transformations after the data lands in the warehouse. Meltano also had a legacy feature called transforms
which is what that warning message is about. Transforms were meltano specific dbt packages that included pre-built transformations for a specific tap's data that were tightly coupled, we've moved away from that pattern. Although you can still use normal dbt packages in your project.pat_nadolny
12/06/2022, 3:34 PMpat_nadolny
12/06/2022, 3:34 PMaaronsteers
12/06/2022, 7:08 PMchristopher_kintzel
12/12/2022, 11:13 AMTARGET_POSTGRES_DBNAME
inside my schedule, like:
schedules:
- name: my-schedule-name
job: my-job-name
env:
TARGET_POSTGRES_DBNAME: mydbname
This works when i run the schedule with meltano schedule run my-schedule-name
, but fails when the schedule is run inside the orchestrator (meltano invoke airflow scheduler
) . Settings this env variable worked with the old EL(T) style schedule in the orchestrator.
It also works when i set the dbname
property directly on the loader, but i want to avoid duplicating (inherit_from) the same postgres loader many times with only a difference in the dbname. Any ideas?christopher_kintzel
12/14/2022, 12:29 PMpat_nadolny
12/14/2022, 1:32 PMchristopher_kintzel
12/14/2022, 1:41 PMappend_env
is not available in previous versions). Is there a specific reason meltano uses 2.1.2 by default?
But I am now getting this error in the log: Environment variable 'MELTANO_LOAD_SCHEMA' referenced but not set. Make sure the environment variable is set.
I have actually seen this error multiple times already while trying different unrelated things as well, but could not find any good information about it online 🙂christopher_kintzel
12/15/2022, 9:59 AMchristopher_kintzel
12/15/2022, 10:00 AMMELTANO_LOAD_SCHEMA
issue.pat_nadolny
12/15/2022, 2:41 PMAccording to @DouweM, this can occur if a custom loader that doesn't define a schema setting, so the env var doesn't get populated and dbt doesn't know what schema to read from.
that seems relevant