From ffa0ace66cd9dabf2bb004ba4e78225e62b73513 Mon Sep 17 00:00:00 2001 From: Hugo Lecuyer Date: Thu, 3 Oct 2024 15:10:42 +0200 Subject: [PATCH] fix(mes-aides): remove space in siret --- .../staging/sources/mes_aides/stg_mes_aides__garages.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline/dbt/models/staging/sources/mes_aides/stg_mes_aides__garages.sql b/pipeline/dbt/models/staging/sources/mes_aides/stg_mes_aides__garages.sql index 21ae2a4d9..d15d7f5cb 100644 --- a/pipeline/dbt/models/staging/sources/mes_aides/stg_mes_aides__garages.sql +++ b/pipeline/dbt/models/staging/sources/mes_aides/stg_mes_aides__garages.sql @@ -35,7 +35,8 @@ final AS ( data #>> '{fields,Partenaire Nom}' AS "partenaire_nom", data #>> '{fields,Région Nom}' AS "region_nom", ARRAY(SELECT * FROM JSONB_ARRAY_ELEMENTS_TEXT(data #> '{fields,Services}')) AS "services", - data #>> '{fields,SIRET}' AS "siret", + -- FIXME(hlecuyer) : Remove this when mes_aides has fixed the issue + REPLACE(data #>> '{fields,SIRET}', ' ', '') AS "siret", data #>> '{fields,Téléphone}' AS "telephone", data #>> '{fields,Type}' AS "type", ARRAY(SELECT * FROM JSONB_ARRAY_ELEMENTS_TEXT(data #> '{fields,Types de véhicule}')) AS "types_de_vehicule",