From 76a4d6c406a541328d1a3bd34660c4b8ef1bbbba Mon Sep 17 00:00:00 2001 From: Victor Perron Date: Thu, 14 Nov 2024 19:53:33 +0100 Subject: [PATCH] chore(pipeline) : Deactivate FT mobility service in Lyon --- .../sources/france_travail/_france_travail_models.yml | 7 +++++++ .../france_travail/int_france_travail__services.sql | 2 ++ 2 files changed, 9 insertions(+) diff --git a/pipeline/dbt/models/intermediate/sources/france_travail/_france_travail_models.yml b/pipeline/dbt/models/intermediate/sources/france_travail/_france_travail_models.yml index a5c2fabcb..35b3fecbf 100644 --- a/pipeline/dbt/models/intermediate/sources/france_travail/_france_travail_models.yml +++ b/pipeline/dbt/models/intermediate/sources/france_travail/_france_travail_models.yml @@ -36,6 +36,13 @@ models: - relationships: to: ref('int_france_travail__adresses') field: id + - name: nom + data_tests: + - not_null + - dbt_utils.not_accepted_values: + values: ['Bilan/Accompagnement mobilité'] + config: + where: "zone_diffusion_code LIKE '69%'" - name: int_france_travail__structures data_tests: diff --git a/pipeline/dbt/models/intermediate/sources/france_travail/int_france_travail__services.sql b/pipeline/dbt/models/intermediate/sources/france_travail/int_france_travail__services.sql index dc9ea2e7a..2545b83d6 100644 --- a/pipeline/dbt/models/intermediate/sources/france_travail/int_france_travail__services.sql +++ b/pipeline/dbt/models/intermediate/sources/france_travail/int_france_travail__services.sql @@ -58,6 +58,8 @@ final AS ( structures.id || '-' || services.id AS "id" FROM services CROSS JOIN structures_with_commune AS structures + -- Service ID 9 (Bilan/Accompagnement mobilité) is not available in Lyon anymore + WHERE NOT (services.id = '9' AND structures.code_insee LIKE '69%') ) SELECT * FROM final