Kg#
Overview#
Knowledge-Graph builder endpoints. They drive the conversion of relational/CSV data into RDF triples loaded in a source’s named graph, and expose helpers to inspect the underlying database schema. Companion entry point at the root: kg.js (whole-source build).
Modules#
1. Triple generation (triples.js)#
POSTgenerates triples from a CSV file or a SQL table for a given source (KGbuilder_main.importTriplesFromCsvOrTable).DELETEremoves triples previously generated by KGBuilder for a source, optionally restricted to a subset of tables.
2. Database introspection (data.js, model.js)#
data.jsreads sample rows from a configured database, or executes aSELECTstatement filtered byUserRequestFiltering.model.jsreturns the table → columns map of a database, used to populate the column pickers in MappingModeler.
3. Graph reset (clearGraph.js)#
Drops every triple from a named graph (SPARQL CLEAR GRAPH). Typically called before a full rebuild.
4. Mapping persistence (mappings.js, mappings/*)#
Saves a mapping document for a source and exposes nested routes to read/list mapping files and recreate triples from them.
5. Asset-level mappings (assets/*)#
Reads global mapping documents shared across mappings targeting the same logical asset.
Files in this directory#
clearGraph.jsdata.jsmappings.jsmodel.jstriples.js