GraphDB Workbench¶
What’s in this document?
The Workbench is the web-based administration interface to GraphDB. It lets you administrate GraphDB, as well as load, transform, explore, manage, query, and export data.
The Workbench layout consists of two main areas. The navigation area is on the left-hand side of the screen and contains drop-down menus to all functionalities - Import, Explore, SPARQL, Monitor, Setup, and Help. The work area shows the tasks associated with the selected functionality. The home page provides easy access to some of the actions in the Workbench such as creating a repository, attaching a location, finding a resource, querying your data, etc. At the bottom of the page, you can see the license details, and in the footer - the versions of the various GraphDB components.

Functionalities¶
Navigation Tab |
Functionality Description |
---|---|
Import |
|
Explore |
|
SPARQL |
|
Monitor |
|
Setup |
|
Help |
|
User Settings¶
These settings help you to configure the default behavior of the GraphDB Workbench.
The Workbench interface has some useful options that change only the way you query the database, not changing the rest of the GraphDB behavior:

Expand results over owl:sameAs - This is the default value for the Expand results over owl:sameAs option in the SPARQL editor. It is taken each time a new tab is created. Note that once you toggle the value in the editor, the changed value is saved in your browser, so the default is used only for new tabs. The setting is also reflected in the Graph settings panel of the Visual graph.
Default Inference value - Same as above, but for the Include inferred data in results option in the SPARQL editor. The setting is also reflected in the Graph settings panel of the Visual graph.
Show schema by default in visual graph - This includes or excludes predicates from
owl:
,rdf:
,rdfs:
,sesame:
,dul:
,prov:
,fibo:
,wd:
.Count total results in SPARQL editor - For each query without limit sent through the SPARQL editor, an additional query is sent to determine the total number of results. This value is needed both for your information and for results pagination. In some cases, you do not want this additional query to be executed, because for example the evaluation may be too slow for your data set. Set this option to
false
in this case.Ignore shared saved queries in SPARQL editor - In the SPARQL editor, saved queries can be shared, and you can choose not to see them.
Application settings are user-based. When security is ON, each user can access their own settings through the
menu. The admin user can also change other users’ settings through .When security is OFF, the settings are global for the application and available through
.When free access is ON, only the admin can edit the Free Access configuration, which applies to the anonymous user.
Autocomplete Index¶
The Autocomplete index offers suggestions for the IRIs’ local names in the SPARQL editor, the View Resource page, and in the Search RDF resources box. It is an open-source GraphDB plugin that builds an index over all IRIs in the repository plus some additional well-known IRIs from RDF4J vocabularies.
The index is disabled by default. In the Workbench, you can enable it from
.
In case you are getting peculiar results and you think the index might be broken, use the Build Now button.

If you try to use autocompletion before it is enabled, a tooltip will warn you that the index is off and provide a link for building it.

You can also enable it with a SPARQL query from the Workbench SPARQL editor.
How the index works¶
All IRIs and their labels are split into words (tokens). During search, the whole words or their beginnings are matched.
For each IRI, the index includes the following:
The text of the IRI local name is tokenized;
If the IRI is part of a triple
<IRI rdfs:label ?label>
, the text of the label literal is tokenized and indexed;If the IRI is part of a triple
<IRI ?p ?label>
, and?p
is added to the index config as label predicate, then the text of the?label
is tokenized and indexed for this IRI. You can add a new label via the right-hand button in the Autocomplete screen, which will open this dialog box:

Local name tokenization¶
Local names are split by special characters (e.g., _
, -
), or in cases when they contain camelCase and/or numbers. For example:
IRI |
Local name tokens |
---|---|
|
Bulgarian Tournament Cup |
|
Post rock |
|
Chardonnay Grape |
|
US Region |
|
ISO 639 3 |
Search strings¶
You can search for one or more words. When searching for multiple words, they can be separated with space, or with -
and _
symbols, in which case these will be required to be present in the matched text as well. You can also use camelCase notation to split the search string into multiple words.
Once the search string has been split into words, search is case-insensitive. When typing multiple words, each of them is treated as full match search and must be fully typed except for the last one, which is treated as startsWith. The order of the search string words is irrelevant, e.g., whiteWin
would return the same results as wineWhit
.
Some examples:
Search string |
Found IRI |
---|---|
“Tour” |
http://dbpedia.org/resource/Bulgarian_Tournament_Cup |
“white win” OR “whiteWin” |
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteTableWine
|
“uk-wal” |
https://www.bbc.com/news/uk-wales-44849196 |
“63” |
http://purl.org/dc/terms/ISO639-3 |
Autocomplete in the SPARQL editor¶
For the examples below, we will be using the W3C wine ontology dataset that you can import in your repository.
To start autocompletion in the SPARQL editor, use the shortcuts Alt+Enter / Ctrl+Space / Cmd+Space depending on your OS and the way you have set up your shortcuts.
You can use autocompletion to:
Search for a single word in all IRIs:
Search only for IRIs that start with a certain prefix:
Search for more than one word:
Indexed text is split where digits or digit sequences are found, so you can also search by number:
Autocomplete in the View resource box¶
To use the autocompletion feature to find a resource, go to the GraphDB home page, and start typing in the View resource field.

You can also autocomplete resources in the Search RDF resource box, which is visible in all GraphDB screens in the top right corner and works the same way as the View resource field in the home page. Clicking the icon will open a search field where you can explore the resources in the repository.

Workbench queries¶
You can also work with the autocomplete index via SPARQL queries in the Workbench SPARQL editor. Some important examples:
Check if the index is enabled
ASK WHERE { _:s <http://www.ontotext.com/plugins/autocomplete#enabled> ?o . }
Enable the index
INSERT DATA { _:s <http://www.ontotext.com/plugins/autocomplete#enabled> true . }
Autocomplete IRIs (here with the wines example from earlier)
SELECT ?s WHERE { ?s <http://www.ontotext.com/plugins/autocomplete#query> "win" }