-
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.
refacto and fixes following val coments
- Loading branch information
Showing
22 changed files
with
156 additions
and
376 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 3 additions & 35 deletions
38
pipeline/dbt/models/intermediate/sources/mes_aides/int_mes_aides__adresses.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 |
---|---|---|
@@ -1,35 +1,3 @@ | ||
WITH adresses_garage AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__adresses_garage') }} | ||
), | ||
|
||
adresses_permis_velo AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__adresses_permis_velo') }} | ||
), | ||
|
||
final AS ( | ||
SELECT | ||
adresses_garage.id, | ||
adresses_garage.commune, | ||
adresses_garage.code_insee, | ||
adresses_garage.longitude, | ||
adresses_garage.latitude, | ||
adresses_garage.source, | ||
adresses_garage.code_postal, | ||
adresses_garage.adresse, | ||
adresses_garage.complement_adresse | ||
FROM adresses_garage | ||
UNION ALL | ||
SELECT | ||
adresses_permis_velo.id, | ||
adresses_permis_velo.commune, | ||
adresses_permis_velo.code_insee, | ||
adresses_permis_velo.longitude, | ||
adresses_permis_velo.latitude, | ||
adresses_permis_velo.source, | ||
adresses_permis_velo.code_postal, | ||
adresses_permis_velo.adresse, | ||
adresses_permis_velo.complement_adresse | ||
FROM adresses_permis_velo | ||
) | ||
|
||
SELECT * FROM final | ||
{{ dbt_utils.union_relations( | ||
relations=[ref('int_mes_aides_garages__adresses'), ref('int_mes_aides_permis_velo__adresses')] | ||
) }} |
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
90 changes: 3 additions & 87 deletions
90
pipeline/dbt/models/intermediate/sources/mes_aides/int_mes_aides__services.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 |
---|---|---|
@@ -1,87 +1,3 @@ | ||
WITH services_garage AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__services_garage') }} | ||
), | ||
|
||
services_permis_velo AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__services_permis_velo') }} | ||
), | ||
|
||
final AS ( | ||
SELECT | ||
adresse_id, | ||
contact_public, | ||
cumulable, | ||
date_creation, | ||
date_maj, | ||
date_suspension, | ||
formulaire_en_ligne, | ||
frais_autres, | ||
id, | ||
justificatifs, | ||
lien_source, | ||
modes_accueil, | ||
modes_orientation_accompagnateur, | ||
modes_orientation_accompagnateur_autres, | ||
modes_orientation_beneficiaire, | ||
modes_orientation_beneficiaire_autres, | ||
nom, | ||
presentation_resume, | ||
presentation_detail, | ||
prise_rdv, | ||
profils, | ||
recurrence, | ||
source, | ||
structure_id, | ||
thematiques, | ||
types, | ||
zone_diffusion_code, | ||
zone_diffusion_nom, | ||
zone_diffusion_type, | ||
pre_requis, | ||
contact_nom_prenom, | ||
courriel, | ||
telephone, | ||
frais, | ||
page_web | ||
FROM services_garage | ||
UNION ALL | ||
SELECT | ||
adresse_id, | ||
contact_public, | ||
cumulable, | ||
date_creation, | ||
date_maj, | ||
date_suspension, | ||
formulaire_en_ligne, | ||
frais_autres, | ||
id, | ||
justificatifs, | ||
lien_source, | ||
modes_accueil, | ||
modes_orientation_accompagnateur, | ||
modes_orientation_accompagnateur_autres, | ||
modes_orientation_beneficiaire, | ||
modes_orientation_beneficiaire_autres, | ||
nom, | ||
presentation_resume, | ||
presentation_detail, | ||
prise_rdv, | ||
profils, | ||
recurrence, | ||
source, | ||
structure_id, | ||
thematiques, | ||
types, | ||
zone_diffusion_code, | ||
zone_diffusion_nom, | ||
zone_diffusion_type, | ||
pre_requis, | ||
contact_nom_prenom, | ||
courriel, | ||
telephone, | ||
frais, | ||
page_web | ||
FROM services_permis_velo | ||
) | ||
|
||
SELECT * FROM final | ||
{{ dbt_utils.union_relations( | ||
relations=[ref('int_mes_aides_garages__services'), ref('int_mes_aides_permis_velo__services')] | ||
) }} |
60 changes: 3 additions & 57 deletions
60
pipeline/dbt/models/intermediate/sources/mes_aides/int_mes_aides__structures.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 |
---|---|---|
@@ -1,57 +1,3 @@ | ||
WITH structures_garage AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__structures_garage') }} | ||
), | ||
|
||
structures_permis_velo AS ( | ||
SELECT * FROM {{ ref('int_mes_aides__structures_permis_velo') }} | ||
), | ||
|
||
final AS ( | ||
SELECT | ||
id, | ||
adresse_id, | ||
siret, | ||
antenne, | ||
rna, | ||
nom, | ||
telephone, | ||
courriel, | ||
site_web, | ||
"source", | ||
lien_source, | ||
horaires_ouverture, | ||
accessibilite, | ||
labels_nationaux, | ||
labels_autres, | ||
typologie, | ||
presentation_resume, | ||
presentation_detail, | ||
date_maj, | ||
thematiques | ||
FROM structures_garage | ||
UNION ALL | ||
SELECT | ||
id, | ||
adresse_id, | ||
siret, | ||
antenne, | ||
rna, | ||
nom, | ||
telephone, | ||
courriel, | ||
site_web, | ||
"source", | ||
lien_source, | ||
horaires_ouverture, | ||
accessibilite, | ||
labels_nationaux, | ||
labels_autres, | ||
typologie, | ||
presentation_resume, | ||
presentation_detail, | ||
date_maj, | ||
thematiques | ||
FROM structures_permis_velo | ||
) | ||
|
||
SELECT * FROM final | ||
{{ dbt_utils.union_relations( | ||
relations=[ref('int_mes_aides_garages__structures'), ref('int_mes_aides_permis_velo__structures')] | ||
) }} |
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
19 changes: 0 additions & 19 deletions
19
...models/intermediate/sources/mes_aides/permis_velo/int_mes_aides__adresses_permis_velo.sql
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.