From 71f329ad2ea8734612025cbbae5e04d48a3d0c38 Mon Sep 17 00:00:00 2001 From: Diego Quintana Date: Thu, 12 Sep 2024 13:33:50 +0200 Subject: [PATCH] fix: replace usage of image main for dbt-deps (et/somenergia-jardiner!159) * fix: replace usage of image main for dbt-deps --- dags/plant_production_datasets_dag.py | 5 ++++- dags/plant_production_datasets_jardiner_dag.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dags/plant_production_datasets_dag.py b/dags/plant_production_datasets_dag.py index 33fef98..aebde83 100644 --- a/dags/plant_production_datasets_dag.py +++ b/dags/plant_production_datasets_dag.py @@ -77,6 +77,9 @@ def dbapi_to_dict(dbapi: str): "DBHOST": dbapi_dict["host"], "DBPORT": dbapi_dict["port"], "DBNAME": dbapi_dict["database"], + "DBT_PACKAGES_INSTALL_PATH": "/home/somenergia/.dbt/dbt_packages", + "DBT_PROFILES_DIR": "/repos/somenergia-jardiner/dbt_jardiner/config", + "DBT_PROJECT_DIR": "/repos/somenergia-jardiner/dbt_jardiner", } dbt_transformation_task = DockerOperator( @@ -84,7 +87,7 @@ def dbapi_to_dict(dbapi: str): task_id="dbt_transformation_task", environment=environment, docker_conn_id="somenergia_harbor_dades_registry", - image="{}/{}-main:latest".format( + image="{}/{}-dbt-deps:latest".format( "{{ conn.somenergia_harbor_dades_registry.host }}", repo_name, ), diff --git a/dags/plant_production_datasets_jardiner_dag.py b/dags/plant_production_datasets_jardiner_dag.py index b63f7da..b9219d1 100644 --- a/dags/plant_production_datasets_jardiner_dag.py +++ b/dags/plant_production_datasets_jardiner_dag.py @@ -79,6 +79,8 @@ def dbapi_to_dict(dbapi: str): "DBPORT": dbapi_dict["port"], "DBNAME": dbapi_dict["database"], "DBT_PACKAGES_INSTALL_PATH": "/home/somenergia/.dbt/dbt_packages", + "DBT_PROFILES_DIR": "/repos/somenergia-jardiner/dbt_jardiner/config", + "DBT_PROJECT_DIR": "/repos/somenergia-jardiner/dbt_jardiner", } dbt_transformation_task = DockerOperator( @@ -86,7 +88,7 @@ def dbapi_to_dict(dbapi: str): task_id="dbt_transformation_task__jardiner", environment=environment, docker_conn_id="somenergia_harbor_dades_registry", - image="{}/{}-main:latest".format( + image="{}/{}-dbt-deps:latest".format( "{{ conn.somenergia_harbor_dades_registry.host }}", repo_name, ),