Resources / Technical evidence

From Two CSV Schemas to a Validated RDF Model

Thompson Axiomata · Published December 2, 2026 · Example version 1

Map six synthetic asset records, quarantine two ambiguous rows, and query the resulting model with reproducible SHACL checks.

Synthetic worked example. Prepared with AI assistance; the reported fixture results were checked by running the supplied code. These are teaching examples, not client outcomes, production benchmarks or independently reviewed accuracy results.

The interoperability question

Which operational assets are at each site, and which source records describe them? Two systems encode the same asset A-100. ERP uses plant-north and ACTIVE; maintenance uses N and in_service. The mapping file explicitly aligns those values. Matching asset IDs are assumed to identify the same physical asset.

Keep records distinct from equipment

The small OWL vocabulary separates Equipment, Site and AssetRecord. Multiple records can describe one equipment item; prov:wasDerivedFrom retains their source links. Source names are part of each record identifier to avoid collisions across systems.

Source fieldModel decision
asset_idStable asset IRI and ex:assetId literal.
site_codeSource-specific lookup to a shared Site IRI.
statusSource-specific lookup to Operational or Retired.
source + record_idDistinct AssetRecord IRI linked from the asset as provenance.

Observed results and negative control

Four of six input rows are accepted and describe three distinct assets. Maintenance row M3 is quarantined for a missing identifier; M4 is quarantined because pending has no approved status mapping. Neither is silently guessed or dropped without a report.

The mapped graph conforms to the supplied SHACL shapes. A negative control removes the site relationship for A-100; the same validation then fails. The query returns two operational assets:

AssetSite
A-100north
A-300south

Download and reproduce

Read the README, extract the ZIP, create an isolated Python environment and run the commands below. The ZIP includes inputs, source, expected outputs, an MIT license and a SHA-256 manifest. The runner fails if its fixture expectations change.

python -m pip install -r requirements.txt
python reproduce.py

Inspect the mapped Turtle graph, SHACL shapes, SPARQL query and positive and negative validation reports. RDFLib 7.1.4 and pySHACL 0.30.1 are pinned in the package.

What the checks establish

The shapes require one asset identifier, one site, one allowed status and at least one source-record link. Conformance checks these stated conditions. It does not establish real-world correctness, resolve identities or prove a source authentic. A conflicting site or status must be investigated, not selected arbitrarily.

This is a teaching ontology, not a reviewed BFO/CCO alignment. It omits temporal status, production governance and access control. A production specification should address those requirements with domain owners. See ontology development.

Standards used

RDF 1.1 concepts, SHACL and SPARQL 1.1 Query describe the underlying model, validation language and query language.

Inspect the related evidence

For project-specific evaluation, share a non-sensitive problem summary. We agree the sources, scope and acceptance criteria before handling project records.