Skip to content

SPARQL

Knowboard uses the SPARQL language to query and modify data in the Knowledge Graph.

Files with .rq or .sparql extensions are detected as SPARQL queries.

Queries can also be embedded in Markdown code blocks with sparql specified as the language:

```sparql
SELECT * WHERE {}
```

The Language Server Protocol is currently limited in features to display query results, so read queries must be executed in the browser or another client.

SPARQL queries will display a CodeLens ▶ Open in SPARQL UI to open the built-in web-based query tool in a browser.

Update queries can be either through a browser or other client, like read queries. However, they can also be run directly in the editor with the ⚡️ Apply Update Code Lens.

The results of the update will appear as unsaved “edits” to the affected files.

The Knowboard SPARQL server is compatible with a variety of standard clients.

https://comunica.dev/docs/query/getting_started/query_cli/

Terminal window
$ npm install -g @comunica/query-sparql
$ comunica-sparql http://localhost:7878/sparql \
-t table 'SELECT ?s ?p ?o WHERE { ?s ?p ?o }'