From dbe33666852780d9a2ace8659faa5441d0c2634c Mon Sep 17 00:00:00 2001 From: Victor Perron Date: Thu, 18 Jul 2024 15:40:59 +0200 Subject: [PATCH] chore(pipeline): fix in-container default DBT conn By default, we run DBT from within the airflow container (as is the case in production). Therefore it should be automatically connected to the docker hostname and port of the datawarehouse, not the host ones. If you need to use DBT from outside docker, then override the appropriate environment vars (see .env.template) --- pipeline/dbt/profiles.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/dbt/profiles.yml b/pipeline/dbt/profiles.yml index 18cf78f8e..04eb52f27 100644 --- a/pipeline/dbt/profiles.yml +++ b/pipeline/dbt/profiles.yml @@ -4,8 +4,8 @@ data_inclusion: dev: type: postgres threads: 1 - host: "{{ env_var('POSTGRES_HOST', 'localhost') }}" - port: "{{ env_var('POSTGRES_PORT', '5455') | int }}" + host: "{{ env_var('POSTGRES_HOST', 'target-db') }}" + port: "{{ env_var('POSTGRES_PORT', '5432') | int }}" user: "{{ env_var('POSTGRES_USER', 'data-inclusion') }}" password: "{{ env_var('POSTGRES_PASSWORD', 'data-inclusion') }}" dbname: "{{ env_var('POSTGRES_DB', 'data-inclusion') }}"