-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
laurinehu
committed
Oct 23, 2023
1 parent
6b6eae6
commit 65d8157
Showing
8 changed files
with
67 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7332e7a3-9cb2-404f-af19-0b084f1b0ce4", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "a2125a19-3c21-4f79-bff8-e99a91e0b1d1", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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,22 +1,12 @@ | ||
select | ||
{{ pilo_star(ref('stg_candidatures'), relation_alias='candidatures') }}, | ||
{{ pilo_star(ref('stg_org_prescripteur'), except=["id_org"], relation_alias='org_prescripteur') }}, | ||
{{ pilo_star(ref('stg_bassin_emploi'), except=["nom_departement", "nom_region", "type_epci", "id_structure"], | ||
relation_alias='bassin_emploi') }}, | ||
{{ pilo_star(ref('stg_reseaux'), except=["SIRET","id_structure"], relation_alias='rsx') }}, | ||
{{ pilo_star(ref('stg_reseaux'), except=["SIRET", "id_structure"], relation_alias='rsx') }}, | ||
case | ||
when candidatures.injection_ai = 0 then 'Non' | ||
else 'Oui' | ||
end as reprise_de_stock_ai, | ||
nom_org.type_auteur_diagnostic_detaille | ||
end as reprise_de_stock_ai | ||
from | ||
{{ ref('stg_candidatures') }} as candidatures | ||
left join {{ ref('stg_bassin_emploi') }} as bassin_emploi | ||
on bassin_emploi.id_structure = candidatures.id_structure | ||
left join {{ ref('stg_org_prescripteur') }} as org_prescripteur | ||
on org_prescripteur.id_org = candidatures.id_org_prescripteur | ||
left join {{ ref('nom_prescripteur') }} as nom_org | ||
on nom_org.origine_detaille = candidatures."origine_détaillée" | ||
left join {{ ref('stg_reseaux') }} as rsx | ||
on candidatures.id_structure = rsx.id_structure | ||
where candidatures.type_structure in ('AI', 'ACI', 'EITI', 'ETTI', 'EI') |
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
select | ||
s.id as id, | ||
s.siret as siret, | ||
s.active as active, | ||
s.ville as ville, | ||
s.nom_complet as "nom_structure_complet" | ||
s.id as id, | ||
s.siret as siret, | ||
s.active as active, | ||
s.ville as ville, | ||
insee_geo.nom_zone_emploi as bassin_emploi_structure, | ||
s.nom_complet as "nom_structure_complet" | ||
from | ||
{{ source('emplois', 'structures') }} as s | ||
left join | ||
{{ ref('stg_insee_appartenance_geo_communes') }} as insee_geo | ||
on ltrim(s.code_commune, '0') = insee_geo.code_insee |