diff --git a/pipelines/datasets/br_cvm_oferta_publica_distribuicao/flows.py b/pipelines/datasets/br_cvm_oferta_publica_distribuicao/flows.py index abd7eb368..f31bd2d7e 100644 --- a/pipelines/datasets/br_cvm_oferta_publica_distribuicao/flows.py +++ b/pipelines/datasets/br_cvm_oferta_publica_distribuicao/flows.py @@ -92,9 +92,7 @@ ) with case(update_metadata, True): - data = extract_last_date( - dataset_id, table_id, "basedosdados", var_name="data_abertura_processo" - ) + data = extract_last_date(dataset_id, table_id, "basedosdados") update_django_metadata( dataset_id, table_id, diff --git a/pipelines/datasets/br_cvm_oferta_publica_distribuicao/tasks.py b/pipelines/datasets/br_cvm_oferta_publica_distribuicao/tasks.py index f96d43e40..0a1aaf362 100644 --- a/pipelines/datasets/br_cvm_oferta_publica_distribuicao/tasks.py +++ b/pipelines/datasets/br_cvm_oferta_publica_distribuicao/tasks.py @@ -95,7 +95,7 @@ def extract_last_date( log("dasdasdsadas") query_bd = f""" - SELECT MAX({var_name}) as max_date + SELECT MAX(data_abertura_processo) as max_date FROM `{billing_project_id}.{dataset_id}.{table_id}` """