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

[fix] br_anp_precos_combustiveis #483

Merged
merged 9 commits into from
Sep 28, 2023
5 changes: 2 additions & 3 deletions pipelines/datasets/br_anp_precos_combustiveis/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ def check_for_updates(dataset_id, table_id):
# Obtém a data mais recente do site
download_files(anatel_constants.URLS_DATA.value, anatel_constants.PATH_INPUT.value)
df = pd.read_csv(anatel_constants.URL_GLP.value, sep=";", encoding="utf-8")
data_obj = df["Data da Coleta"].max()
data_obj = datetime.strptime(data_obj, "%d/%m/%Y").strftime("%Y-%m-%d")
data_obj = datetime.strptime(data_obj, "%Y-%m-%d").date()
data_obj = pd.to_datetime(df["Data da Coleta"]).max()
data_obj = data_obj.date()

# Obtém a última data no site BD
data_bq_obj = extract_last_date(
Expand Down
Loading