GraphDB Workbench

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.

_images/workbench-landing-page.png

Functionalities

Navigation Tab

Functionality Description

Import

  • Import data from local files, from files on the server where the Workbench is located, from a remote URL (with a format extension or by specifying the data format), or by pasting the RDF data in the Text area tab. Each import method supports different serialization formats.

Explore

  • Graphs overview –> See a list of the default graph and all named graphs in GraphDB. Use it to inspect the statements in each graph, export the graph, or clear its data.

  • Class hierarchy –> Explore the hierarchy of RDF classes by number of instances. The biggest circles are the parent classes and the nested ones are their children. Hover over a given class to see its subclasses or zoom in a nested circle (RDF class) for further exploration.

  • Class relationships –> Explore the relationships between RDF classes, where a relationship is represented by links between the individual instances of two classes. Each link is an RDF statement where the subject is an instance of one class, the object is an instance of another class, and the link is the predicate. Depending on the number of links between the instances of two classes, the bundle can be thicker or thinner and it gets the color of the class with more incoming links. The links can be in both directions.

  • Visual graph –> Explore your data graph in a visual way. Start from a single resource and the resources connected to it, or from a graph query result. Click on a resource to expand its connections as well.

  • Similarity –> Look up semantically similar entities and text.

SPARQL

  • SPARQL –> Query and update your data. Use any type of SPARQL query and click Run to execute it.

Monitor

  • Queries and Updates –> Monitor all running queries or updates in GraphDB. Any query or update can be killed by pressing the Abort button.

  • Resources –> Monitor:

    • The usage of various system resources: system CPU load, file descriptors, heap memory usage, off-heap memory usage, and disk storage.

    • The performance of: queries, global page cache, entity pool, and transactions and connections.

    • Cluster health (in case a cluster exists).

Setup

  • Repositories –> Manage repositories and connect to remote locations. A location represents a local or remote instance of GraphDB. Only a single location can be active at a given time.

  • Users and Access –> Manage users and their access to the GraphDB repositories. You can also enable or disable the security of the entire Workbench. When disabled, everyone has full access to the repositories and the admin functionality.

  • My Settings –> Configure the default behavior of the Workbench.

  • Connectors –> Create and manage GraphDB Connector instances.

  • Cluster –> Manage a GraphDB cluster - create or modify a cluster by dragging and dropping the nodes, or use it to monitor the state of a running cluster in near real time. The view shows repositories from the active location and all remote locations.

    Note

    This feature requires a GraphDB Enterprise license.

  • Namespaces –> View and manipulate the RDF namespaces for the active repository. You need a write permission to add or delete namespaces.

  • Autocomplete –> Enable/disable the autocomplete index and check its status. It is used for automatic completion of URIs in the SPARQL editor and the View Resource page.

  • RDF Rank –> Identify the more important or popular entities in your repository by examining their interconnectedness determined by the RDF Rank algorithm. Their popularity can then be used to order query results.

  • JDBC –> Configure the JDBC driver to allow SQL access to repository data.

  • SPARQL Templates –> Create and store predefined SPARQL templates for futures updates of repository data.

  • License –> View the details of your current GraphDB license and set or revert to a different one.

Help

  • Interactive guides –> A set of interactive guides that will lead you through various GraphDB functionalities using the Workbench user interface.

  • REST API –> REST API documentation of all available public RESTful endpoints together with an interactive interface for executing requests.

  • Documentation –> Link to the GraphDB public documentation.

  • Developer Hub –> Link to the GraphDB dev hub - a hands-on compendium to the GraphDB documentation that gives practical advice and tips on accomplishing real-world tasks.

  • Support –> Link to the GraphDB support page.

  • System information –> See the configuration values of the JVM running the GraphDB Workbench: Application Info, JVM Arguments, and Workbench Configuration properties. You can also generate a detailed server report file that you can use to hunt down issues.

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:

_images/application-settings.png
  • 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 Setup ‣ My Settings menu. The admin user can also change other users’ settings through Setup ‣ User and access ‣ Edit user.

When security is OFF, the settings are global for the application and available through Setup ‣ My Settings.

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 Setup ‣ Autocomplete.

_images/autocompleteEnable.png

In case you are getting peculiar results and you think the index might be broken, use the Build Now button.

_images/autocompleteBuildNow.png

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.

_images/autocomplete-enable-link.png

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:

_images/autocomplete-add-label.png

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

http://dbpedia.org/resource/Bulgarian_Tournament_Cup

Bulgarian Tournament Cup

http://dbpedia.org/resource/Post-rock

Post rock

http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape

Chardonnay Grape

http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#USRegion

US Region

http://purl.org/dc/terms/ISO639-3

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:

    _images/autocomplete-single-word-in-all-IRIs.png
  • Search only for IRIs that start with a certain prefix:

    _images/autocomplete-IRI-starts-with-prefix.png
  • Search for more than one word:

    _images/autocomplete-multiple-words.png
  • Indexed text is split where digits or digit sequences are found, so you can also search by number:

    _images/autocomplete-search-by-number.png

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.

_images/autocomplete-viewResource.png

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.

_images/autocomplete-search-rdf-resource.png

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"
    }