Kuzu Link

Kuzu allows users to attach supported external databases (currently including PostgreSQL, MySQL, DuckDB, and SQLite) using a simple connection string.

Example Syntax:

ATTACH DB 'postgresql://user:pass@host:5432/my_db' AS my_external_db;

Once attached, the tables within the external database become accessible to the Kuzu query engine. This "links" the external system, allowing Kuzu to read metadata and plan queries that span across both local graph data and remote relational tables. kuzu link

Even with robust design, you might encounter issues. Here are solutions to frequent Kuzu Link problems:

Problem: "Query runs slowly on first execution but fast afterwards."
Solution: That’s the page cache warming up. Kuzu Link uses OS-level memory mapping. If your dataset exceeds RAM, the first traversal loads pages from disk. Consider increasing buffer_pool_size in the configuration. Kuzu allows users to attach supported external databases

Problem: "Link deletion is sluggish."
Solution: Deleting a relationship forces a rewrite of the adjacency list in Kuzu Link’s current version. Batch your deletions or mark links as "inactive" with a boolean property instead.

Problem: "Cannot traverse beyond 10 hops."
Solution: By default, Kuzu Link limits recursion depth to 10 for safety. Increase with SET max_hops = 50 at the session level, but monitor memory usage. Once attached, the tables within the external database

db = kuzu.Database("./my_kuzu_db") conn = kuzu.Connection(db)

Place frequently traversed properties on the link itself rather than on the nodes. For example, if you often filter "friendships created after 2023," include that timestamp as a property on the [:KNOWS] relationship. Kuzu Link scans relationship columns sequentially, so selective filters on edges execute faster than post-filtering nodes.

Kuzu Link is ideal for building lineage systems. You can model the relationships between datasets (e.g., "Table A feeds Table B") in the graph, while linking to the actual tables in the data warehouse to query their schemas or metadata dynamically.

kuzu link