Skip to content

Commit b20d2d4

Browse files
authored
Résolution de la configuration SOREN (#1563)
1 parent 66fb1ed commit b20d2d4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

dags/sources/dags/source_soren.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
"origin": "nom_de_lorganisme",
2424
"destination": "nom",
2525
},
26+
{
27+
"origin": "enseigne_commerciale",
28+
"destination": "nom_commercial",
29+
},
30+
{
31+
"origin": "consignes_dacces",
32+
"destination": "description",
33+
},
2634
{
2735
"origin": "longitudewgs84",
2836
"destination": "longitude",
@@ -32,6 +40,11 @@
3240
"destination": "latitude",
3341
},
3442
# 2. Transformation des colonnes
43+
{
44+
"origin": "site_web",
45+
"transformation": "clean_url",
46+
"destination": "url",
47+
},
3548
{
3649
"origin": "ecoorganisme",
3750
"transformation": "strip_lower_string",
@@ -78,6 +91,11 @@
7891
"value": constants.ACTEUR_ACTIF,
7992
},
8093
# 4. Transformation du dataframe
94+
{
95+
"origin": ["siret", "siren"],
96+
"transformation": "clean_siret_and_siren",
97+
"destination": ["siret", "siren"],
98+
},
8199
{
82100
"origin": ["latitude", "longitude"],
83101
"transformation": "compute_location",
@@ -107,6 +125,11 @@
107125
"transformation": "clean_adresse",
108126
"destination": ["adresse", "code_postal", "ville"],
109127
},
128+
{
129+
"origin": ["telephone", "code_postal"],
130+
"transformation": "clean_telephone",
131+
"destination": ["telephone"],
132+
},
110133
{
111134
"origin": [
112135
"point_dapport_de_service_reparation",
@@ -147,8 +170,11 @@
147170
{"remove": "point_dapport_de_service_reparation"},
148171
{"remove": "point_dapport_pour_reemploi"},
149172
{"remove": "point_de_reparation"},
173+
{"remove": "perimetre_dintervention"},
174+
{"remove": "service_a_domicile"},
150175
# 6. Colonnes à garder (rien à faire, utilisé pour le controle)
151176
{"keep": "email"},
177+
{"keep": "adresse_complement"},
152178
],
153179
"endpoint": (
154180
"https://data.pointsapport.ademe.fr/data-fair/api/v1/datasets/"

0 commit comments

Comments
 (0)