From a464edac1038d9892f51100a2b63648fcf37fe30 Mon Sep 17 00:00:00 2001 From: Victor Perron Date: Mon, 22 Jul 2024 15:54:49 +0200 Subject: [PATCH] chore(pipeline) : Add an explicit DBT model dependency The 'services' table has an implicit dependency to the 'structures' mart as its constraint enforces a check on its structure_id key towards that table. Make sure DBT knows about it so it generates the structures first. Referenced by https://github.com/dbt-labs/dbt-core/issues/8062, might be fixed in https://github.com/dbt-labs/dbt-common/pull/163 last week but: - not released - not documented - not sure the commit will actually help when I read it, needs more changes I suppose --- .../dbt/models/marts/inclusion/marts_inclusion__services.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipeline/dbt/models/marts/inclusion/marts_inclusion__services.sql b/pipeline/dbt/models/marts/inclusion/marts_inclusion__services.sql index 673f7ef1b..d20e37dbb 100644 --- a/pipeline/dbt/models/marts/inclusion/marts_inclusion__services.sql +++ b/pipeline/dbt/models/marts/inclusion/marts_inclusion__services.sql @@ -1,3 +1,5 @@ +-- depends_on: {{ ref('marts_inclusion__structures') }} + WITH services AS ( SELECT * FROM {{ ref('int__union_services__enhanced') }} ),