SQLite Connector
KumoRFM can connect directly to SQLite databases, automatically inferring table metadata and relationships from the database schema.
Installation
The SQLite backend requires the ADBC SQLite driver:
Or install the driver directly:
Quick Start
The simplest way to create a graph from a SQLite database:
This will:
- Connect to the SQLite database
- Discover all tables automatically
- Infer column metadata (data types, semantic types, primary keys, time columns)
- Detect foreign key relationships from the database schema
- Print a summary of the inferred metadata and links
Specifying Tables
You can control which tables to include and customize their configuration:
Table configuration options:
Connection Options
You can pass a file path or an existing ADBC connection:
Controlling Metadata Inference
By default, Graph.from_sqlite() infers metadata and links. You can disable this for manual configuration:
Manual Edge Specification
Override automatic link detection by providing edges explicitly:
Optimizing Performance
When initializing KumoRFM with a SQLite-backed graph, the optimize=True flag creates database indices for faster context sampling:
This is recommended for larger databases where sampling performance matters. Note that this requires write access to the database file.