

















sqlite-import.sh /path/to/bkb_flat_files/ /desired/output/Use import.sh --bundle-path=/path/to/bundle --db-name=bkb --user=pg --host=… [--schema …] [--drop-table-if-exists], with psql installedThese extra tables help you explore the data structure:
| System Table | Description |
| tables | Lists all content tables in BKB‑HD |
| table_columns | Columns, types, and simple stats (distinct values <1000) |
| table_values | Values and descriptions for categorical columns with <1000 distinct values |
| version_info | Version metadata for the current build |
| views | Listing of pivot views (e.g., molecule_metadata_pivot) |
Pivot views are great for display/output. For filtering, use the base metadata tables and join with pivot views only for presentation.
Example: Exploring the Schema & Data with SQL
sqlCopyEdit
SELECT * FROM tables ORDER BY table_name
SELECT column_name, data_type, distinct_valuesFROM table_columnsWHERE table_name = 'molecule_metadata'
SELECT column_name, column_value, descriptionFROM table_valuesWHERE table_name = 'molecule_metadata' AND column_name = 'molecule_type'
SELECT * FROM version_info;
SELECT *FROM molecule_metadata_pivotWHERE molecule_id = 'GENE12345'
KB‑HD provides full REST API access for programmatic exploration.
pythonCopyEditimport requestsEven though BKB‑AI is powered by knowledge graphs with AI-derived edges, you can still interrogate metadata via standard SQL tables. Graph‑specific querying (e.g., via specialized APIs or graph databases) is available when licensed, but relational querying is a great first step for schema discovery and basic filtering.
Performance Tips & Indexing
sql
CopyEdit
CREATE INDEX idx_aggregated_molecule_disease_and_function_idON molecule_disease_and_function_relationships_aggregated_ids(aggregated_relationship_id);
Best Practices & Caution
Quick Start Summary
Partner with Services to tailor or create notebooks to meet your endpoints faster. We can do the heavy lifting while you get onboarding with a proof-of-concept project.

Need to take care of some setup or administration tasks? Check out the admin page.
We also host live virtual trainings on a regular basis.