Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] br_ms_sinan.microdados_dengue #904

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pipelines/datasets/br_ms_sinan/flows.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
from copy import deepcopy

from prefect.run_configs import KubernetesRun
from prefect.storage import GCS

from pipelines.utils.crawler_datasus.flows import flow_sinan
from pipelines.constants import constants
from pipelines.datasets.br_ms_sinan.schedules import (
Expand Down
1 change: 0 additions & 1 deletion pipelines/utils/crawler_datasus/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@
file_list=dbc_files,
dataset_id=dataset_id,
table_id=table_id,
chunk_size = 150000,
upstream_tasks=[dbf_files, dbc_files],
)

Expand Down
8 changes: 7 additions & 1 deletion pipelines/utils/crawler_datasus/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
General purpose functions for the br_ms_cnes project
"""

import gc
import asyncio
from datetime import datetime
from ftplib import FTP
Expand Down Expand Up @@ -88,6 +88,12 @@ def dbf_to_parquet(dbf: str, table_id: str, counter: int, chunk_size:int) -> st

df.to_parquet(parquet_filepath, index=None, compression='gzip')

del df

gc.collect()




except struct.error as err:
#unlink .partquer extension and remove dbf file
Expand Down
Loading