Skip to content

Commit 7d69a79

Browse files
committed
[Data] fix regulation flow for data.gouv
1 parent 0382dac commit 7d69a79

File tree

7 files changed

+4
-9
lines changed

7 files changed

+4
-9
lines changed

pipeline/src/flows/regulations_open_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def get_regulations_for_csv(regulations: gpd.GeoDataFrame) -> pd.DataFrame:
3434

3535
columns = [
3636
"id",
37-
"ent_name",
3837
"url",
3938
"layer_name",
4039
"facade",
@@ -63,7 +62,6 @@ def get_regulations_for_geopackage(
6362

6463
columns = [
6564
"id",
66-
"ent_name",
6765
"url",
6866
"layer_name",
6967
"facade",

pipeline/src/queries/cross/cacem/regulations.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ SELECT
2020
resume,
2121
md5(
2222
COALESCE(geom::text, '') ||
23-
COALESCE(ent_name::text, '') ||
2423
COALESCE(url::text, '') ||
2524
COALESCE(layer_name::text, '') ||
2625
COALESCE(facade::text, '') ||
@@ -42,7 +41,7 @@ SELECT
4241
FROM prod."REG_ENV_V3"
4342
WHERE
4443
geom IS NOT NULL
45-
AND ent_name IS NOT NULL
44+
AND resume IS NOT NULL
4645
AND layer_name IS NOT NULL
4746
AND thematique IS NOT NULL
4847
AND id IN :ids

pipeline/src/queries/cross/cacem/regulations_hashes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ SELECT
2323
FROM prod."REG_ENV_V3"
2424
WHERE
2525
geom IS NOT NULL
26-
AND ent_name IS NOT NULL
26+
AND resume IS NOT NULL
2727
AND layer_name IS NOT NULL
2828
AND thematique IS NOT NULL

pipeline/src/queries/cross/cacem/regulations_open_data.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
SELECT
22
id,
3-
ent_name,
43
url,
54
layer_name,
65
facade,

pipeline/src/queries/cross/cacem/tags_regulatory_areas.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ SELECT
44
FROM prod.tags_regulatory_areas
55
INNER JOIN prod."REG_ENV_V3" regulatory_areas ON regulatory_areas_id = regulatory_areas.id
66
WHERE regulatory_areas.geom IS NOT NULL
7-
AND regulatory_areas.ent_name IS NOT NULL
7+
AND regulatory_areas.resume IS NOT NULL
88
AND regulatory_areas.layer_name IS NOT NULL
99
ORDER BY tags_id

pipeline/src/queries/cross/cacem/themes_regulatory_areas.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ SELECT
44
FROM prod.themes_regulatory_areas
55
INNER JOIN prod."REG_ENV_V3" regulatory_areas ON regulatory_areas_id = regulatory_areas.id
66
WHERE regulatory_areas.geom IS NOT NULL
7-
AND regulatory_areas.ent_name IS NOT NULL
7+
AND regulatory_areas.resume IS NOT NULL
88
AND regulatory_areas.layer_name IS NOT NULL
99
ORDER BY themes_id

pipeline/tests/test_data/cacem_database/V666.504__regulatory_areas_themes_and_tags.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ CREATE TABLE IF NOT EXISTS prod."REG_ENV_V3"
55
(
66
id serial primary key,
77
geom geometry(MultiPolygon, 4326),
8-
ent_name varchar,
98
url varchar,
109
layer_name varchar,
1110
facade varchar,

0 commit comments

Comments
 (0)