File tree Expand file tree Collapse file tree
containers/airflow/dags/brasil/sinan Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,12 +83,13 @@ def update_dengue(egh_conn: dict):
8383 file = sinan .download (sinan .get_files (dis_code , year ))
8484
8585 df = parquets_to_dataframe (file .path )
86+ df .columns = df .columns .str .lower ()
8687 df ['year' ] = year
8788 df ['prelim' ] = False
8889 df .to_sql (
8990 name = tablename ,
90- con = engine . connect ( ),
91- schema = schema ,
91+ con = create_engine ( egh_conn [ 'URI' ] ),
92+ schema = "brasil" ,
9293 if_exists = 'append' ,
9394 index = False
9495 )
@@ -104,12 +105,13 @@ def update_dengue(egh_conn: dict):
104105 file = sinan .download (sinan .get_files (dis_code , year ))
105106
106107 df = parquets_to_dataframe (file .path )
108+ df .columns = df .columns .str .lower ()
107109 df ['year' ] = year
108110 df ['prelim' ] = True
109111 df .to_sql (
110112 name = tablename ,
111113 con = create_engine (egh_conn ['URI' ]),
112- schema = schema ,
114+ schema = "brasil" ,
113115 if_exists = 'append' ,
114116 index = False
115117 )
You can’t perform that action at this time.
0 commit comments