Skip to content

commons-research/vscode-sparql-notebook

 
 

Repository files navigation

VSCode SPARQL Notebook

This extension provides a SPARQL Notebook mode for Visual Studio Code. This is a powerful way to document SPARQL queries and make them execute as notebook code cells.

Use a SPARQL notebook to:

  • Provide hands-on SPARQL training
  • Document data available via SPARQL
  • Validate data via SPARQL

This notebook can render SPARQL SELECT results and RDF graphs via SPARQL CONSTRUCT queries.

sparql-notebook

We recommend using it in conjunction with the Stardog RDF Grammars and SPARQL Language Server for SPARQL syntax highlighting and auto-completion.

This extension is still pretty raw but it works for us [tm]. Bug reports & contributions are very welcome!

Features

  • Open any .sparqlbook file as a Notebook.
  • Execute query blocks in the Notebook UI and view output.
  • Configure endpoint connections in the SPARQL Notebook side panel.

Installation

You can install it directly from the Visual Studio Code Extension tab. It is available on the Marketplace

Usage

Open any .sparqlbook file with the Open With menu option. Then, select the SPARQL Notebook format. Connect to a SPARQL Endpoint and execute query blocks and view output interactively.

FAQ

Show SELECT Results as a Table

Technically that means set the default renderer for MIME-Type application/sparql-results+json.

  1. in the output cell, choose application/sparql-results+json
  2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac),
  3. Search for "mime" and click: "Notebook: Save Mimetype Display Order"
  4. You will be prompted to choose either to ...
    • enable that default setting globally (choose "User Settings")
    • or locally for that specific workspace (choose "Workspace Settings")

save_mimetype_order

Export as Markdown

Right click a .sparqlbookfile and select Export to Markdown.

Use query files

You can attach a query file to a cell. The query file will be loaded and executed when the cell is executed. The query file can be a .sparql or .rq file.

The query files will be updated on notebook save.

ext-query

Contribute

This extension uses the Notebook API . Contributions & bug fixes are always welcome!

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.9%
  • JavaScript 10.1%
  • CSS 3.0%