diff --git a/hydrocron/db/load_data.py b/hydrocron/db/load_data.py index d031bca..121f7da 100755 --- a/hydrocron/db/load_data.py +++ b/hydrocron/db/load_data.py @@ -365,8 +365,12 @@ def load_data(dynamo_resource, table_name, items): logging.info("Item %s: %s", feature_id, items[i][feature_id]) hydrocron_table.batch_fill_table(items) + logging.info("Finished loading %s items", len(items)) + else: logging.info("Adding %s items to table individually", feature_name) for item_attrs in items: logging.info("Item %s: %s", feature_id, item_attrs[feature_id]) hydrocron_table.add_data(**item_attrs) + + logging.info("Finished loading %s items", len(items)) diff --git a/hydrocron/db/schema.py b/hydrocron/db/schema.py index dd6f966..6dae601 100644 --- a/hydrocron/db/schema.py +++ b/hydrocron/db/schema.py @@ -115,11 +115,6 @@ def batch_fill_table(self, items): try: with table.batch_writer() as writer: for item in items: - logger.info( - "Item %s size: %s", - item[self.partition_key_name], - str(sys.getsizeof(item)) - ) if sys.getsizeof(item) < 300000: writer.put_item(Item=item) else: