The SPARQL Executor Visual Studio Code extension is a simple utility which allows you to configure SPARQL end-points and execute SPARQL queries.
Open settings.json in Visual Studio Code and add SPARQL endpoints:
For example: the following configuration defines a Wikidata and a Dbpedia endpoint:
"sparql-executor.endpoints": [
{
"protocol": "https",
"host": "query.wikidata.org",
"path": "/sparql",
"name": "Wikidata",
"customHeaders": [
{
"headerName": "User-Agent",
"headerValue": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0"
},
],
"method": "GET",
"queryParameterName": "query"
},
{
"protocol": "https",
"host": "dbpedia.org",
"name": "DBpedia",
"path": "/sparql"
}
]
cmd+shift+P- Type the command
Select SPARQL Endpoint - Hit
enter - Search for and highlight your desired endpoint
- Hit
enter
The default key command for selecting a SPARQL endpoint is: control + shift + E.
cmd+shift+P- Type the command
Execute SPARQL Query - Hit
enter
The default key command for executing a SPARQL query is: control + shift + X.
This extension contributes the following settings:
sparql-executor.endpoints: configured list of SPARQL endpointssparql-executor.endpoints.protocol: SPARQL endpoint protocol (httpsorhttp)sparql-executor.endpoints.host: SPARQL endpoint host, e.g.example.com(do not include a path)sparql-executor.endpoints.path: SPARQL endpoint path, e.g./sparqlsparql-executor.endpoints.method: SPARQL endpoint HTTP method, e.g.GET(defaults toPOST)sparql-executor.endpoints.queryParameterName: Custom SPARQL query post data/query string parameter name, e.g.querysparql-executor.endpoints.output: SPARQL results output formar, e.g.table(defaults tojson)sparql-executor.endpoints.customHeaders: Define custom headers to be included in the SPARQL requestsparql-executor.endpoints.customHeaders.[].headerName: Name of the custom headersparql-executor.endpoints.customHeaders.[].headerValue: Value of the custom headersparql-executor.endpoints.authentication: SPARQL endpoint authentication configurationsparql-executor.endpoints.authentication.type: SPARQL endpoint authentication type (currently only supportsbasic)sparql-executor.endpoints.authentication.username: SPARQL endpoint authentication username (for basic auth)sparql-executor.endpoints.authentication.password: SPARQL endpoint authentication password (for basic auth)
Initial release of SPARQL Executor which can simply:
- Configure multiple SPARQL endpoints with:
- Protocol
- Host
- Authentication (currently only basic auth)
- Execute SPARQL queries and updates
- Adds support for SPARQL results output in JSON
- Fixes VS code status bar issue when SPARQL query fails
- Fixes issue where focus is pulled away from SPARQL query in editor to output console when showing SPARQL query results in JSON output format
- Update of dependencies
- Update of dependencies
- Added the ability to configure
- SPARQL URL path
- Request method (POST or GET)
- SPARQL query parameter name in the request post data/query string
- Custom request headers
- Update to changelog
- Update of dependencies
- Now showing error popup in UI for SPARQL parse errors
- Updated example SPARQL endpoint configuration in README


