You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-25Lines changed: 46 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@ This extension is still pretty raw but it works for us [tm]. Bug reports & contr
23
23
- Open any `.sparqlbook` file as a Notebook.
24
24
- Execute query blocks in the Notebook UI and view output.
25
25
- Configure endpoint connections in the SPARQL Notebook side panel.
26
+
- Export a `.sparqlbook` file to Markdown.
27
+
- Attach `.sparql` or `.rq` files to cells.
28
+
- Use a local RDF file as a data source.
26
29
27
30
## Installation
28
31
@@ -32,6 +35,49 @@ You can install it directly from the Visual Studio Code Extension tab. It is ava
32
35
33
36
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.
34
37
38
+
## Endpoints
39
+
40
+
Endpoints are the destinations for sending SPARQL queries, and there are two types:
41
+
42
+
### Remote Servers (HTTP / HTTPS)
43
+
You can connect to a remote server by clicking the `+` button in the `SPARQL Connections` panel. Fill in the server URL and optional credentials. If you omit credentials, the extension will attempt a connection without them. This connection is used throughout the entire notebook, except when a cell defines its own endpoint.
44
+
45
+
### Local Endpoints
46
+
Configure a local endpoint by right-clicking on a TTL, NT, or RDF file and selecting `SPARQL Notebook: Use File as Store`. This creates a new local endpoint populated with the chosen file's content. The entire notebook uses this endpoint, except when a cell specifies its own.
You can assign an endpoint to a specific cell by adding a comment with the endpoint URL or file path in a code cell:
52
+
53
+
```sparql
54
+
# [endpoint=https://lindas.admin.ch/query]
55
+
```
56
+
57
+
or
58
+
```sparql
59
+
# [endpoint=./relative/path/file.ttl]
60
+
```
61
+
62
+
```sparql
63
+
# [endpoint=/absolute/path/file.ttl]
64
+
```
65
+
Working with relative paths makes the notebook portable.
66
+
67
+
### Cell Status Bar
68
+
The cell status bar displays information about the endpoint in use and its source.
69
+
70
+
## Code Cell (SPARQL Cell)
71
+
A code cell contains a SPARQL query, which can be a SELECT, ASK, CONSTRUCT, or DESCRIBE query. Execute a code cell by clicking the Run Cell button in the cell toolbar or pressing Ctrl+Enter (or Option+Enter on Mac).
72
+
73
+
### Query from a file
74
+
You can attach a query file to a cell. The query file will load and execute when you run the cell. Supported file extensions include `.sparql` and `.rq`. Saving the notebook also saves the query file.
The cell status bar indicates whether the cell uses a query file.
80
+
35
81
## FAQ
36
82
37
83
### Show SELECT Results as a Table
@@ -51,34 +97,9 @@ Technically that means set the default renderer for MIME-Type `application/sparq
51
97
52
98
Right click a `.sparqlbook`file and select `Export to Markdown`.
53
99
54
-
### Use query files
55
-
56
-
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.
Notebook API ](https://code.visualstudio.com/api/extension-guides/notebook). Contributions & bug fixes are always welcome!
73
-
74
-
# Development
75
-
76
-
The notebook extension is located in `src/extension`.
77
-
78
-
## Notebook Output Cells
79
-
### SELECT / ASK Results
80
-
A "renderer" refers to a component or extension that is responsible for displaying specific types of content or output within a notebook cell.
81
-
82
-
This project provides a renderer for `application/sparql-results+json` MIME-Type. This is the MIME-Type that is used to represent SPARQL SELECT and SPARQL ASK results.
83
-
84
-
You find the renderer in `src/renderer`. It is a simple React component that renders a table.
0 commit comments