SELECT with Turtle requested
This example requests Turtle for a SELECT query. The endpoint may return
another response format or reject the request. Vitrify records the actual
response type and chooses the filename extension from it — for example
results.xml or results.json — falling back to .ttl only if that media
type is missing or unrecognized. Older history entries still use
results.ttl from before that naming rule.
printf '%s' 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?person ?personName WHERE {
?person rdfs:label ?personName .
FILTER(LANG(?personName) = "en")
}
' |
vitrify sparql --endpoint https://qlever.dev/api/wikidata \
--query - \
--format turtle \
--to select-turtle
Failure0.93 s
Response bytes
select-turtle/
├── ro-crate-metadata.json
└── query.rq
Failure
endpoint returned HTTP 502 Bad Gateway
{
"@context": "https://w3id.org/ro/crate/1.2/context",
"@graph": [
{
"@id": "ro-crate-metadata.json",
"@type": "CreativeWork",
"about": {
"@id": "./"
},
"conformsTo": {
"@id": "https://w3id.org/ro/crate/1.2"
}
},
{
"@id": "query.rq",
"@type": "File",
"contentSize": "161",
"encodingFormat": "application/sparql-query",
"sha256": "72eb3ea85dd2b339d4db332c8f1b539f689888dada3706f2f52daf4c5dac4e20"
},
{
"@id": "https://qlever.dev/api/wikidata",
"@type": "Organization"
},
{
"@id": "https://vitrify.iolanta.tech",
"@type": "SoftwareApplication",
"name": "Vitrify",
"url": "https://vitrify.iolanta.tech",
"version": "0.1.2"
},
{
"@id": "#retrieval-duration",
"@type": "PropertyValue",
"name": "Retrieval duration",
"propertyID": "retrieval-duration",
"unitCode": "SEC",
"value": 0.933906464
},
{
"@id": "#error",
"@type": "Thing",
"description": "endpoint returned HTTP 502 Bad Gateway"
},
{
"@id": "./",
"@type": "Dataset",
"additionalProperty": [
{
"@id": "#retrieval-duration"
}
],
"datePublished": "2026-10-30T17:51:26.721102088+00:00",
"description": "SPARQL retrieval recorded by Vitrify.",
"hasPart": [
{
"@id": "query.rq"
}
],
"license": "No license asserted by Vitrify; consult the source endpoint's terms of use.",
"name": "SPARQL retrieval",
"publisher": {
"@id": "https://qlever.dev/api/wikidata"
}
},
{
"@id": "#retrieval",
"@type": "CreateAction",
"actionStatus": {
"@id": "http://schema.org/FailedActionStatus"
},
"agent": {
"@id": "https://vitrify.iolanta.tech"
},
"description": "HTTP 502; Accept: text/turtle",
"endTime": "2026-10-30T17:51:26.721102088+00:00",
"error": {
"@id": "#error"
},
"identifier": "https://qlever.dev/api/wikidata",
"instrument": {
"@id": "https://vitrify.iolanta.tech"
},
"object": [
{
"@id": "https://qlever.dev/api/wikidata"
},
{
"@id": "query.rq"
}
],
"startTime": "2026-10-30T17:51:25.780736924+00:00"
}
]
}
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?person ?personName WHERE {
?person rdfs:label ?personName .
FILTER(LANG(?personName) = "en")
}