Skip to content

Commit 575d5cc

Browse files
authored
print count of facts when running dataset create command to help debug (#516)
1 parent aa13e93 commit 575d5cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

digital_land/commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ def dataset_create(
422422
if pqpackage.strategy != "direct":
423423
pqpackage.group_parquet_files(input_dir, target_mb=256)
424424
pqpackage.load_facts(input_dir)
425+
# temporary diagnostic to verify fact count before sqlite load
426+
fact_parquet_count = pqpackage.conn.execute(
427+
f"SELECT COUNT(*) FROM parquet_scan('{pqpackage.fact_path}')"
428+
).fetchone()[0]
429+
logger.info(f"fact.parquet row count before sqlite load: {fact_parquet_count}")
425430
pqpackage.load_fact_resource(input_dir)
426431
pqpackage.load_entities(input_dir, resource_path, organisation_path)
427432

0 commit comments

Comments
 (0)