ingo_klose
02/02/2021, 2:37 PMdbt | Running with dbt=0.16.1
dbt | Encountered an error:
dbt | Compilation Error
dbt | Env var required but not provided: 'DBT_SOURCE_SCHEMA'
Thanks, Ingodouwe_maan
02/02/2021, 6:42 PMdbt with? Can you share your meltano elt invocation?
The DBT_SOURCE_SCHEMA env var corresponds to dbt's source_schema setting, which (through a few layers of indirection: https://meltano.com/docs/integration.html#how-to-use) is typically set to the loader's schema , which itself is typically set to the extractor's namespace (e.g. tap_gitlab for tap-gitlab ).
If DBT_SOURCE_SCHEMA is not set, that suggests that one of these settings is missing. Are you using a custom loader, by any chance?ingo_klose
02/03/2021, 5:51 AMdefault_target_schema instead of schema. I set an additional attribute meltano config <loader> set _target_schema <target_schema> and that did the trick.douwe_maan
02/03/2021, 4:10 PMtarget_schema: $TARGET_REDSHIFT_DEFAULT_TARGET_SCHEMA in the meltano.yml definition for target-redshift so that it automatically picks up the value for its default_target_schema setting.ingo_klose
02/04/2021, 9:12 AMtarget-redshift because the default_target_schema is differentdouwe_maan
02/04/2021, 3:42 PM