Skip to content

SPARQL Connections

The SPARQL Connections View provides lets you manage all SPARQL endpoints that can be selected in query files or Mentor notebooks to execute queries against local or remote endpoints:

Screenshot of the SPARQL Connections View in Visual Studio Code

The view is divided into two sections: User and Workspace.

TypeDescription
UserUser connections are only available to the current user and are typically stored on the user’s local machine.
WorkspaceWorkspace connections are stored in the .vscode directory and can thus be shared with other users in version controlled repositories.

The connections tree offers several actions that are visible as icons in the title bar:

ActionDescription
Test All ConnectionsExecutes a connection test on all connections in the view.
Add ConnectionConfigure a new SPARQL connection.

When you select or hover a connection in the list view, additional actions will become available in the connection header:

Hovering over a SPARQL connection item
ActionDescription
List GraphsExecutes a SPARQL query to list all graphs in the selected connection.
Test ConnectionExecutes a connection test on the selected connection.
Delete ConnectionDeletes the selected SPARQL connection.

When you select an existing connection in the connections manager or when you click on the ‘Add Connection’ icon, the connection details will be displayed in a new tab.

From here, you can modify the connection settings, such as the SPARQL endpoint URL, authentication credentials, and other parameters. Once you have made your changes, you can save them to update the connection.

SPARQL connection parameter form

The following authentication methods are supported for SPARQL connections:

TypeDescription
NoneNo authentication.
BasicBasic HTTP(s) authentication using a username and password.
Bearer TokenAuthentication using a bearer token.
Microsoft EntraAuthentication using Microsoft Entra ID provider that is built into Visual Studio Code.

Once you have configured a connection, you can test it to ensure that it is working correctly. To test a connection, follow these steps:

  1. Click on the button on the list item or in the connection detail view.
  2. The connection status will be displayed as a notification.

If the test fails, you may need to adjust the connection settings and try again.

To delete a connection from the connections view you can either use the icon in the connections manager or click on the same icon in the connection detail view.

When asked, confirm the deletion when prompted. Please keep in mind that once a connection is deleted, it cannot be recovered, so make sure you really want to delete it before confirming.