vh
11/17/2021, 10:28 AMgit: "{{ env_var('DBT_REPO') }}".
But there are two my DBT projects have the same model name, so if two these schedules run at the same time then I met the error
dbt found two resources with the name xxx. Since these resources have the same name,
dbt will be unable to find the correct resource
taylor
11/17/2021, 2:44 PMvh
11/17/2021, 3:35 PMdbt found two resources with the database representation "xxx_yyy_dataset.Table_DDD".
dbt cannot create two resources with identical database representations
It’s very easy to have the same model names as I have many DBT projects. I think Meltano can create an DBT project instance independently for every run to avoid this?taylor
11/17/2021, 9:51 PMdustin_miller
11/18/2021, 12:08 AMdbt
projects all share the same models, but you just need to apply them with different source schemas? We did something similar to this, and defined variables in our dbt
project to hold the schema name that should be used for a given dbt run
. We then pass in those variables in a custom BashOperator
task in our Airflow DAGs, rather than using Meltano’s built-in transform operation.vh
11/18/2021, 1:51 AMvh
11/18/2021, 1:53 AMvh
11/18/2021, 1:55 AMtaylor
11/18/2021, 12:16 PMdustin_miller
11/18/2021, 5:33 PMvh
11/19/2021, 1:51 AMschedules:
- name: transformer-1
extractor: tap-1
loader: target-1
transform: only
interval: '0 */1 * * *'
- name: transformer-2
extractor: tap-2
loader: target-2
transform: only
interval: '0 */1 * * *'
In package.yml
packages:
- git: "{{ env_var('TARGET_DBT_REPO') }}"
vh
11/19/2021, 1:54 AM