Graph Configuration Reference¶
Graph configurations orchestrate one or more table configurations into a single knowledge-graph build — author one to produce KGX output with tablassert build-kg (see the CLI reference). To check a single table config on its own, use tablassert validate <table.yaml> --schema table.
Purpose¶
A graph configuration file specifies: - Output knowledge graph name, version, and description - List of table configurations to process - Database location for entity resolution - Resource Ingest Guide (RIG) metadata (contributions and UI explanation)
QC auditing and verbose logging are controlled at build time via the build-kg --qc and build-kg --log flags — they are not graph-config fields.
Schema¶
Required Fields¶
| Field | Type | Description |
|---|---|---|
name |
String | Knowledge graph name (used in output filenames and the RIG) |
version |
String | Knowledge graph version (used in output filenames) |
description |
String | Source-scope description written into the generated RIG |
tables |
List[Path] | Paths to table configuration YAML files |
fullmap |
Path | Path to the fullmap redb file, or a base directory containing it |
Optional Fields¶
| Field | Type | Description |
|---|---|---|
contributions |
List[String] | RIG contribution statements for graph provenance. Defaults to ["Tablassert: KGX and RIG generation"] |
ui_explanation |
String | RIG explanation applied to generated edge-type metadata. Defaults to a built-in description of how Tablassert transforms source records into Biolink associations |
infores |
String | Graph-level infores: CURIE emitted as the default Biolink primary_knowledge_source and RIG source_info.infores_id. Defaults to infores:<kebab-name> derived from name |
Field Details¶
Notes beyond the tables above:
version— common values:"1.0.0","UNSTABLE","BETA".infores— must start withinfores:; a name likeMULTIOMICS_KGderivesinfores:multiomics-kg. Set it when the graph's Translator information resource differs from the output name, or a non-PMC/PMID source KG needs a stable manually-curated infores.tables— paths are absolute or relative to the process CWD (not the graph-config file location; there is no config-relative resolver). See Table Configuration.fullmap— a redb file or a base directory containing it, resolved viafullmap_db_path(). See Fullmap for build commands and schema.
Minimal Example¶
name: MY_GRAPH
version: 1.0.0
description: Knowledge graph built from configured tabular source data.
infores: infores:my-graph
tables:
- ./my-table.yaml
fullmap: /data/fullmap
Multi-Table Example¶
name: MULTIOMICS_KG
version: UNSTABLE
description: Multi-omics knowledge graph integrating gene-disease, drug-target, and protein-interaction tables.
tables:
- /configs/gene-disease-associations.yaml
- /configs/drug-targets.yaml
- /configs/protein-interactions.yaml
fullmap: /databases/fullmap
Processing Flow¶
When you run tablassert build-kg graph.yaml:
- Load graph configuration - Parse YAML, validate schema
- Load table configurations - Parse each YAML in
tables - Extract sections - Expand templates into per-section
Tcodeinstances - Collect instructions (per section):
- Read the source file from disk (
source.local) - Apply transformations and resolve entities using
fullmap - Validate with the QC audit when
build-kg --qcis passed - Build subgraphs - Compile each section's resolved data into a parquet file
- Compile graph - Aggregate all subgraph parquets and export
{name}_{version}.nodes.ndjson/.edges.ndjson/.RIG.yaml
Output Files¶
Given this configuration:
Produces:
- EXAMPLE_KG_2.0.0.nodes.ndjson
- EXAMPLE_KG_2.0.0.edges.ndjson
- EXAMPLE_KG_2.0.0.RIG.yaml
Real-World Example¶
From MOKGV6.yaml:
name: MULTIOMICS_KG
version: UNSTABLE
description: Multi-omics knowledge graph derived from the ALAMV6 tabular source.
tables:
- /local_raid1/sgoetz/STORE/CONFIG/TABLASSERT/TABLE/V6/ALAMV6.yaml
fullmap: /local_raid1/sgoetz/CODE/FULLMAP/fullmap
This processes a single table configuration (ALAMV6.yaml) into a knowledge graph named MULTIOMICS_KG_UNSTABLE.
Next Steps¶
- Table Configuration - Learn how to define table transformations
- Fullmap - Entity-resolution database build and schema
- Tutorial - Complete example walkthrough