From 961f2c4f7f679993ee36426178731fdcc43d5319 Mon Sep 17 00:00:00 2001 From: Corey Goodfred Date: Tue, 16 Jan 2024 10:23:40 -0500 Subject: [PATCH] [COST-4573] Sync partitions prior to querying data for bill creation (#4868) --- koku/masu/processor/parquet/parquet_report_processor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koku/masu/processor/parquet/parquet_report_processor.py b/koku/masu/processor/parquet/parquet_report_processor.py index c27c3f08bb..98dbdbe983 100644 --- a/koku/masu/processor/parquet/parquet_report_processor.py +++ b/koku/masu/processor/parquet/parquet_report_processor.py @@ -492,11 +492,11 @@ def create_parquet_table(self, parquet_file, daily=False, partition_map=None): processor.create_schema() if not processor.table_exists(): processor.create_table(partition_map=partition_map) - if not daily: - processor.create_bill(bill_date=bill_date) + self.trino_table_exists[self.report_type] = True processor.get_or_create_postgres_partition(bill_date=bill_date) processor.sync_hive_partitions() - self.trino_table_exists[self.report_type] = True + if not daily: + processor.create_bill(bill_date=bill_date) def check_required_columns_for_ingress_reports(self, col_names): LOG.info(log_json(msg="checking required columns for ingress reports", context=self._context))