Skip to content

Configuration

The config is a JSON file. A config file is one run. The root object holds input, output, and the run knobs directly. Load it with squashage-dag build --config squashage.config.json.

Schema source of truth: src/schemas/squashage-config.schema.json.

Copy squashage.config.example.json as a starting point.

Root shape

ts
{
  input:      { basePath: string; format: 'json' | 'jsonl' };  // required
  output:     OutputConfig;                          // required — see Output config below
  concurrency: number;                               // optional, default 1
  graphs:     { [key: string]: string };             // optional — named-graph IRI overrides
  ontology:   OntologyConfig;                        // optional — pass-through; plugins build the ontology
  quarantine: QuarantineConfig;                      // optional — quarantine output overrides
  subjectIri: SubjectIriConfig;                      // optional — subject IRI minting policy
}

The DAG topology is authored as .dag.jsonld documents and loaded at construction. See DAG for the full topology.

input

KeyTypeRequiredWhat it does
basePathstringyesBase directory for the run's input.
format"json" | "jsonl"yesOne JSON object per file (json), or one per line (jsonl).

Root knobs

KeyTypeRequiredDefaultNotes
inputobjectyesInput source — see above.
outputOutputConfigyesSee Output config.
concurrencyinteger ≥ 1no1Maximum concurrent record-DAG clones in the native scatter.
graphsobjectnoNamed-graph IRI overrides; keys map to services.graphs.
ontologyobjectnoPass-through config; plugins construct JsonTologyOntology in register(). services.ontology is always null at the framework level.
quarantineobjectnoQuarantine output directory overrides.
subjectIriobjectnoSubject IRI minting policy.

Plugin

Plugin-specific configuration (classifiers, ontology engine, enrichment predicates) is owned by the plugin, not the run config. Pass --plugin <namespace> on the CLI to load the plugin. The plugin reads its own config from its source directory. See Plugins for the authoring contract.


Output config

See Output for full details. The minimal shape:

ts
{
  type:   'file';
  path:   string;
  format: 'turtle' | 'trig' | 'ntriples' | 'nquads' | 'jsonld';
  mode?:  'dataset' | 'stream';   // default 'dataset'; 'stream' streams quads to disk
}

type is the discriminant. rdfjs-finalize writes these files on every run:

FileWhat it carries
<output.path>The success graph.
<output.path-stem>.prov.<ext>PROV-O activity graph emitted by the dispatcher's lifecycle hooks.
<outDir>/<run>/quarantine/<bucket>/<id>.jsonFailed records, grouped by bucket.

Example

jsonc
{
  "input":  { "basePath": "./input", "format": "json" },
  "output": { "type": "file", "path": "./graphs/aonprd.trig", "format": "trig" },
  "concurrency": 4,
  "graphs": { "default": "https://example.org/graph/aonprd/default" }
}

For bounded-memory streaming, set output.mode to stream and write a quad format:

jsonc
{
  "input":  { "basePath": "./input", "format": "json" },
  "output": { "type": "file", "path": "./graphs/aonprd.nq", "format": "nq", "mode": "stream" }
}

Released under the MIT License.