diff --git a/etl/steps/__init__.py b/etl/steps/__init__.py index ab91890ad09..0bda428dd90 100644 --- a/etl/steps/__init__.py +++ b/etl/steps/__init__.py @@ -781,6 +781,8 @@ def run(self) -> None: # is fetching the whole dataset from data-api as they would receive all tables merged in a single # table. This won't be a problem after we introduce the concept of "tables" for table in dataset: + assert not table.empty, f"table {table.metadata.short_name} is empty" + # if GRAPHER_FILTER is set, only upsert matching columns if config.GRAPHER_FILTER: cols = table.filter(regex=config.GRAPHER_FILTER).columns.tolist() @@ -807,7 +809,9 @@ def run(self) -> None: # stop logging to stop cluttering logs if i > 20 and verbose: verbose = False - thread_pool.submit(lambda: (time.sleep(5), log.info("upsert_dataset.continue_without_logging"))) + thread_pool.submit( + lambda: (time.sleep(10), log.info("upsert_dataset.continue_without_logging")) + ) futures.append(thread_pool.submit(upsert, t, catalog_path=catalog_path, verbose=verbose)) diff --git a/etl/steps/data/garden/un/2023-08-16/igme.py b/etl/steps/data/garden/un/2023-08-16/igme.py index 7188c5e2303..72479e1536d 100644 --- a/etl/steps/data/garden/un/2023-08-16/igme.py +++ b/etl/steps/data/garden/un/2023-08-16/igme.py @@ -186,7 +186,7 @@ def calculate_under_fifteen_mortality_rates(tb: Table) -> Table: If there are 100 deaths per 1000 under fives, then we need to adjust the denominator of the 5-14 age group to take account of this. """ - u5_mortality = tb[tb["indicator"] == "Under-five mortality rate"] + u5_mortality = tb[tb["indicator"] == "Under-five deaths"] mortality_5_14 = tb[tb["indicator"] == "Mortality rate age 5-14"] tb_merge = pr.merge(