-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #601 from MTES-MCT/feat-admin-express-epci
Ajout du chargement des EPCI au dag ingest_admin_express
- Loading branch information
Showing
9 changed files
with
108 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% macro epci(source_table_name) %} | ||
{{ config(materialized='table') }} | ||
|
||
SELECT | ||
id, | ||
nom as name, | ||
code_siren as code, | ||
nature, | ||
ST_Area(geom) as surface, | ||
geom | ||
FROM | ||
{{ source('public', source_table_name) }} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ | ||
config( | ||
materialized='table', | ||
indexes=[ | ||
{'columns': ['id'], 'type': 'btree'}, | ||
{'columns': ['code'], 'type': 'btree'}, | ||
{'columns': ['name'], 'type': 'btree'}, | ||
{'columns': ['geom'], 'type': 'gist'} | ||
]) | ||
}} | ||
|
||
SELECT | ||
*, | ||
32620 AS srid_source | ||
FROM {{ ref('epci_guadeloupe') }} | ||
UNION ALL | ||
SELECT | ||
*, | ||
32620 AS srid_source | ||
FROM {{ ref('epci_martinique') }} | ||
UNION ALL | ||
SELECT | ||
*, | ||
2972 AS srid_source | ||
FROM {{ ref('epci_guyane') }} | ||
UNION ALL | ||
SELECT | ||
*, | ||
2975 AS srid_source | ||
FROM {{ ref('epci_reunion') }} | ||
UNION ALL | ||
SELECT | ||
*, | ||
2154 AS srid_source | ||
FROM {{ ref('epci_metropole') }} |
1 change: 1 addition & 0 deletions
1
airflow/include/sql/sparte/models/admin_express/epci_guadeloupe.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ epci('epci_guadeloupe') }} |
1 change: 1 addition & 0 deletions
1
airflow/include/sql/sparte/models/admin_express/epci_guyane.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ epci('epci_guyane') }} |
1 change: 1 addition & 0 deletions
1
airflow/include/sql/sparte/models/admin_express/epci_martinique.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ epci('epci_martinique') }} |
1 change: 1 addition & 0 deletions
1
airflow/include/sql/sparte/models/admin_express/epci_metropole.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ epci('epci_metropole') }} |
1 change: 1 addition & 0 deletions
1
airflow/include/sql/sparte/models/admin_express/epci_reunion.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ epci('epci_reunion') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters