Skip to content

Connections Tree

The Connections Tree provides a view of all SPARQL connections that can be used to issue queries. These SPARQL connections can be selected in query files or Mentor notebooks to execute queries against local or remote endpoints.

Screenshot of the Connections Tree in Visual Studio Code

The tree view is titled ‘Connections’ and enables the management of connections to SPARQL endpoints.

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

ActionDescription
Add ConnectionConfigure a new SPARQL connection.
Refresh TreeManually refreshes the connections tree.
Collapse / Expand AllCollapse or Expand all nodes in the connections tree.

The tree displays two types of connections, 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.

When you select an existing connection in the tree view or when you click on the ‘Add Connection’ icon in the title bar, the connection details will be displayed in an editor pane. 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. Select the connection you want to test in the connections tree.
  2. Click on the button in the editor pane.
  3. The connection status will be displayed in the editor pane.

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

To delete a connection from the connections tree, follow these steps:

Deleting a SPARQL connection using the context-menu
  1. Select the connection you want to delete in the connections tree.
  2. Right-click on the connection and select “Delete” from the context menu.
  3. Confirm the deletion when prompted.

Alternatively, you can delete a connection by selecting it and clicking on the icon in the connection header.

Deleting a SPARQL connection using delete icon

Once a connection is deleted, it cannot be recovered, so make sure you really want to delete it before confirming.