Skip to content

Commit

Permalink
fix-column-name-epci
Browse files Browse the repository at this point in the history
  • Loading branch information
hlecuyer committed Sep 19, 2024
1 parent 37ffad0 commit 617ab96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pipeline/dags/dag_utils/sources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"token": Variable.get("MES_AIDES_AIRTABLE_KEY", None),
},
"permis_velo": {
"filename": "aides.json",
"filename": "permis_velo.json",
"url": Variable.get("MES_AIDES_PERMIS_VELO_URL", None),
"token": Variable.get("MES_AIDES_AIRTABLE_KEY", None),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ zone_code AS (
SELECT
permis_velo.id,
communes.code,
communes.siren_epci,
communes.departement,
communes.region
communes.code_epci,
communes.code_departement,
communes.code_region
FROM permis_velo
LEFT JOIN communes ON permis_velo.code_postal = ANY(communes.codes_postaux) AND permis_velo.ville_nom = communes.nom
),
Expand Down Expand Up @@ -158,9 +158,9 @@ final AS (
transformed_types.transformed_types AS "types",
CASE
WHEN zone_diffusion.zone_di = 'commune' THEN zone_code.code
WHEN zone_diffusion.zone_di = 'epci' THEN zone_code.siren_epci
WHEN zone_diffusion.zone_di = 'region' THEN zone_code.region
WHEN zone_diffusion.zone_di = 'departement' THEN zone_code.departement
WHEN zone_diffusion.zone_di = 'epci' THEN zone_code.code_epci
WHEN zone_diffusion.zone_di = 'region' THEN zone_code.code_region
WHEN zone_diffusion.zone_di = 'departement' THEN zone_code.code_departement
WHEN zone_diffusion.zone_di = 'pays' THEN NULL
END AS "zone_diffusion_code",
CASE
Expand Down

0 comments on commit 617ab96

Please sign in to comment.