From dcf2c2d4f1bb801e1a69523f857ed29a0b90a403 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 673f7ef1..d20e37db 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') }} ),