From 51dfac359debcaa05d685412d53f559547de7f6c Mon Sep 17 00:00:00 2001 From: Geoff-Robin Date: Sun, 14 Sep 2025 21:30:26 +0530 Subject: [PATCH] Removed print statements used while debugging --- cognee/tasks/schema/ingest_database_schema.py | 9 +++------ cognee/tasks/schema/models.py | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cognee/tasks/schema/ingest_database_schema.py b/cognee/tasks/schema/ingest_database_schema.py index 6d6f0b5f3..2ac57d0ba 100644 --- a/cognee/tasks/schema/ingest_database_schema.py +++ b/cognee/tasks/schema/ingest_database_schema.py @@ -42,7 +42,6 @@ async def ingest_database_schema( async with engine.engine.begin() as cursor: for table_name, details in schema.items(): - print(table_name) rows_result = await cursor.execute(text(f"SELECT * FROM {table_name} LIMIT {max_sample_rows}")) rows = [dict(zip([col["name"] for col in details["columns"]], row)) for row in rows_result.fetchall()] count_result = await cursor.execute(text(f"SELECT COUNT(*) FROM {table_name};")) @@ -57,15 +56,13 @@ async def ingest_database_schema( foreign_keys=details.get("foreign_keys", []), sample_rows=rows, row_count_estimate=row_count_estimate, - description=f"Schema table for '{table_name}' with {len(details['columns'])} columns and approx. {row_count_estimate} rows." + description=f"" ) schema_tables.append(schema_table) tables[table_name] = details sample_data[table_name] = rows for fk in details.get("foreign_keys", []): - print(f"ref_table:{fk['ref_table']}") - print(f"table_name:{table_name}") relationship = SchemaRelationship( id=uuid5(NAMESPACE_OID, name=f"{fk['column']}:{table_name}:{fk['ref_column']}:{fk['ref_table']}"), source_table=table_name, @@ -73,7 +70,7 @@ async def ingest_database_schema( relationship_type="foreign_key", source_column=fk["column"], target_column=fk["ref_column"], - description=f"Foreign key relationship: {table_name}.{fk['column']} → {fk['ref_table']}.{fk['ref_column']}" + description=f"" ) schema_relationships.append(relationship) @@ -84,7 +81,7 @@ async def ingest_database_schema( tables=tables, sample_data=sample_data, extraction_timestamp=datetime.utcnow(), - description=f"Database schema '{schema_name}' containing {len(schema_tables)} tables and {len(schema_relationships)} relationships." + description=f"" ) return { diff --git a/cognee/tasks/schema/models.py b/cognee/tasks/schema/models.py index ef9374163..0fb248758 100644 --- a/cognee/tasks/schema/models.py +++ b/cognee/tasks/schema/models.py @@ -28,7 +28,7 @@ class SchemaRelationship(DataPoint): """Represents relationships between tables""" source_table: str target_table: str - relationship_type: str + relationship_type: str # "foreign_key", "one_to_many", etc. source_column: str target_column: str description: str