Skip to content

Commit 41c7f00

Browse files
committed
fix #15 #17 #21 working dbt
1 parent 0afee4c commit 41c7f00

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed
Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
-- {{ config(materialized='table', schema='ods') }}
2+
3+
with covidfrance_raw_airbyte as (
4+
select
5+
ab_id as id,
6+
emitted_at,
7+
data::json->'dc' as nb_deces,
8+
data::json->'dep' as departement,
9+
data::json->'rad' as nb_retours_au_domicile,
10+
data::json->'rea' as nb_reanimations,
11+
data::json->'hosp' as nb_hospitalisations,
12+
data::json->'jour' as date_notification,
13+
data::json->'sexe' as sexe
14+
15+
from {{ source('stg', 'covid-france_stg') }}
16+
)
17+
218
select
3-
ab_id as id,
4-
emitted_at,
5-
data::json->'dc' as nb_deces,
6-
data::json->'dep' as departement,
7-
data::json->'rad' as nb_retours_au_domicile,
8-
data::json->'rea' as nb_reanimations,
9-
data::json->'hosp' as nb_hospitalisations,
10-
data::json->'jour' as date_notification,
11-
data::json->'sexe' as sexe
12-
13-
from {{ source('stg', 'covid-france_stg') }}
19+
id::TEXT,
20+
emitted_at::DATE,
21+
nb_deces::TEXT,
22+
departement::TEXT,
23+
nb_retours_au_domicile::TEXT,
24+
nb_reanimations::TEXT,
25+
nb_hospitalisations::TEXT,
26+
date_notification::TEXT,
27+
sexe::TEXT
28+
from covidfrance_raw_airbyte

0 commit comments

Comments
 (0)