Ferrosa includes a native SPARQL 1.1 endpoint for semantic web and RDF workloads. Query your CQL tables with W3C-standard SPARQL, including property paths, aggregations, and RDF* annotations. No separate triple store needed.
SPARQL queries are submitted over HTTP to port 8080 (configurable via
FERROSA_SPARQL_BIND). Enable with FERROSA_SPARQL_ENABLED=true.
| Method | Path | Content-Type | Description |
|---|---|---|---|
POST |
/sparql |
application/sparql-query |
Execute a SPARQL query (raw text body) |
GET |
/sparql?query=... |
- | Execute a SPARQL query (URL-encoded) |
GET |
/sparql/health |
- | Health check |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?email WHERE { ?person foaf:name ?name . ?person foaf:mbox ?email . } LIMIT 10
PREFIX foaf: <http://xmlns.com/foaf/0.1/> # Find all people reachable through "knows" chains SELECT DISTINCT ?person ?friend WHERE { ?person foaf:knows+ ?friend . }
PREFIX schema: <http://schema.org/> SELECT ?city (COUNT(?person) AS ?count) WHERE { ?person schema:address ?addr . ?addr schema:addressLocality ?city . } GROUP BY ?city ORDER BY DESC(?count)
PREFIX foaf: <http://xmlns.com/foaf/0.1/> INSERT DATA { <http://example.org/alice> foaf:name "Alice" . <http://example.org/alice> foaf:knows <http://example.org/bob> . }
PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?name ?email WHERE { ?person foaf:name ?name . OPTIONAL { ?person foaf:mbox ?email } FILTER(STRSTARTS(?name, "A")) }
| Feature | Status | Notes |
|---|---|---|
| SELECT | Available | Basic graph patterns, joins |
| WHERE / FILTER | Available | Predicate evaluation on bindings |
| ORDER BY / LIMIT / OFFSET | Available | Post-processing on result set |
| ASK | Available | Boolean existence |
| Property paths (+, *, ?) | Planned | Server-side BFS/DFS via adjacency index |
| OPTIONAL / UNION | Planned | Left-join, concat semantics |
| CONSTRUCT / DESCRIBE | Planned | RDF graph construction |
| INSERT DATA / DELETE DATA | Planned | SPARQL Update |
| RDF* annotations | Planned | Statement-about-statement queries |
| Aggregates (COUNT, SUM, AVG) | Planned | GROUP BY support |
| Format | Content-Type | Status |
|---|---|---|
| SPARQL JSON Results | application/sparql-results+json | Available |
| Turtle | text/turtle | Planned |
| N-Triples | application/n-triples | Planned |
| JSON-LD | application/ld+json | Planned |
SPARQL queries are parsed by the spargebra crate into an algebra tree,
then translated by the ferrosa-sparql planner into storage reads against CQL-backed
triple tables. Property path queries delegate to the graph engine's BFS/DFS traversal
via the adjacency index. Results are serialized to W3C SPARQL JSON Results format.
RDF triples are stored in standard CQL tables with composite primary keys. Secondary indexes on predicate and object enable efficient pattern matching beyond simple subject lookups. The same storage engine, S3 durability, and distributed consensus that power CQL queries also power SPARQL.
| Environment Variable | Default | Description |
|---|---|---|
FERROSA_SPARQL_ENABLED | false | Enable SPARQL endpoint |
FERROSA_SPARQL_BIND | 0.0.0.0:8080 | SPARQL HTTP listen address |
Ferrosa SPARQL is currently in beta. Feature availability reflects the current release.