SQLite Connector
Use the SQLite connector to create a Kumo Relational graph from a local SQLite database file. The graph represents your tables, column metadata, and relationships so that Kumo Relational can use the database for predictive queries.
Installation
Install the SDK with the relational and SQLite extras. This command includes the Arrow Database Connectivity (ADBC) driver that Kumo Relational uses to access SQLite:
If the SDK is already installed, you can install only the SQLite driver:
Quick Start
Pass the path to your SQLite database file to create a graph:
This operation performs the following actions:
- Connects to the SQLite database.
- Discovers all tables automatically.
- Infers column metadata, including data types, semantic types, primary keys, and time columns.
- Detects foreign-key relationships from the database schema.
- Prints a summary of the inferred metadata and links.
Specify Tables
By default, Kumo Relational includes every table it discovers.
Use the tables parameter when you want to include a subset of tables or override an inferred setting:
Each entry can be a table name or a configuration dictionary with these keys:
Set the Database Path
Pass the database file path as the first argument:
Control Metadata Inference
By default, Graph.from_sqlite() infers metadata and links during graph creation.
To defer those operations, set infer_metadata=False, then run them explicitly when you are ready:
Specify Edges Manually
Use the edges parameter to provide relationships instead of relying on automatic link detection.
Each tuple contains the source table, its foreign-key column, and the referenced table:
Pass edges=None to permit declared or inferred relationships.
Pass edges=[] to create the graph without edges and suppress relationship inference.