Skip to content
iolanta-techPublic

About

Turn a SPARQL retrieval into a durable local file with metadata and provenance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Vitrify

Documentation Rust 1.88+

Vitrify saves a SPARQL response as an ordinary local file, alongside the exact query and RO-Crate retrieval evidence.

With Rust and Cargo installed, install Vitrify from crates.io:

cargo install vitrify

Retrieve five EU-capital labels from Wikidata:

echo 'SELECT ?label WHERE { ?country wdt:P463 wd:Q458; wdt:P36 ?capital . ?capital rdfs:label ?label . FILTER(LANG(?label) = "en") } ORDER BY ?label LIMIT 5' |
  vitrify sparql \
  --endpoint https://query.wikidata.org/sparql \
  --query - \
  --format csv \
  --to eu-capitals

The output directory contains:

eu-capitals/
  results.csv
  query.rq
  ro-crate-metadata.json

results.csv is the endpoint response body, stored unchanged. The metadata records retrieval details, including the endpoint, response media type, and checksums for the query and result. A captured response looks like this:

label
Amsterdam
Athens
Berlin
Bratislava
Brussels

See the CLI reference for options and the roadmap for planned work.

About

Turn a SPARQL retrieval into a durable local file with metadata and provenance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages