Skip to content

RDF and SPARQL

Provider Support

G.V() supports most major RDF providers, including Amazon Neptune, Stardog, QLever, Tentris, AllegroGraph, and Virtuoso.
To view the available providers, open the New Database Connection window and select the RDF category.
If your target database does not appear in the list, choose RDF (Other) to connect manually.

SPARQL Queries

In the Query Editor, you can write all five types of SPARQL queries:
ASK, SELECT, DESCRIBE, CONSTRUCT, and UPDATE (e.g., INSERT, DELETE, etc.).
The execution of UPDATE queries depends on whether your connection has write permissions on the target endpoint.

You can also import your global prefixes (defined in the Default RDF Prefixes Settings) directly into the editor. Simply start typing with the prefix namespace to automatically insert it as a PREFIX declaration in your query.

Auto-import prefixes in G.V() editor

While editing or reviewing a query, the Query Assistant window displays SPARQL documentation, RDF-related references, and data model details for RDF nodes and edges.

SPARQL Query Results

Depending on the query type, G.V() provides multiple result views and visualizations.

For SELECT, DESCRIBE, and CONSTRUCT queries, the following views are available:

  • SPARQL-JSON View
  • Table View
  • List View
  • Graph Visualization
  • Vertices and Edges View

If the database provider supports RDF Explain, a Query Plan will also be available for SELECT queries.

For ASK and all UPDATE queries, you can view the raw SPARQL-JSON output returned by the endpoint.

In all result views, long RDF IRIs are automatically prefixified if they match any namespaces defined in the Default RDF Prefixes Settings.

Graph Visualization

To ensure consistency across both LPG and RDF graphs, G.V() retains the concept of labels for RDF nodes.
In RDF datasets:

  • A node’s label is determined by its rdf:type predicate (if present).
  • If no such predicate exists, the label defaults to <no_type>.

Edges in RDF graphs lack both types and properties.

When rendering query results, G.V() automatically recognizes RDF nodes (subjects representing entities) and draws a vertex for each.
Edges are rendered when a predicate is found either among the query result variables or within the SPARQL query patterns (e.g., constant property paths).

Editing and Viewing Node Details

All literals associated with a node are displayed and editable in the Sidebar – View Selected Item panel.
If a literal has a language tag, it is shown as @<lang>.

IRIs attached to a node that are not internal entities (for example, a person’s email address URI) are represented as separate vertices connected by edges.

Adding Literals and Vertices

You can add any number of literals to vertices by specifying:

  • The literal key (predicate)
  • The datatype (e.g., xsd: types or custom types)
  • The language tag (if applicable)
  • The literal value

To add a new vertex, either the node type or at least one literal must be provided. Since all RDF data are expressed as triples, an initial triple (via a type or literal) is required to store a new vertex in the target triplestore. G.V() Error when RDF node has neither a type nor properties

Adding Edges

When creating a new edge, only the edge IRI (predicate) can be entered.
In RDF, edges cannot have their own literals or properties. G.V() adding RDF edges

Using Prefixed IRIs

While entering key–value pairs in the Graph Visualizer, you may use prefixed IRIs.
G.V() automatically expands these IRIs based on the namespaces defined in the Global RDF Prefix Settings.