Skip to content

Creating Visual Queries

Kārlis Čerāns edited this page Sep 20, 2024 · 3 revisions

To start visual query creation, create a new query diagram first. For that, in the project diagrams view, click on the "New diagram" button, choose 'Query' as the diagram type and enter the name of the new diagram.

Create Visual Queries

In a query diagram the tabs for lists of classes, properties and individuals (from the data schema) will appear in the right sidebar. Double-click an item in a list to seed a query from it.

image

The new item will appear as an orange (query focus) node. Next, you can:

  • click the newly created node and, in the right sidebar, set query properties such as the attributes to return from the query
  • right-click or Ctrl-click on the node and choose an action from the context menu (e.g. to add a link to another node)

When selecting information about the node attributes or relations between nodes, ViziQuer offers term auto-completion by clicking Ctrl+Space.

Right sidebar

Example of the context menu:

Context menu

For additional information on various visual queries you can create with ViziQuer please see ViziQuer User Manual.

Note: A diagram may contain multiple queries (connected graphs that start with orange rectangles – query "seed" nodes).

Run the visual query

Congratulations! – You have created your first ViziQuer query.

Example ViziQuer visual query

Right-click or Ctrl-click on the query (orange rectangle) and choose:

  • Generate query SPARQL – to generate a SPARQL query
  • Execute query – to generate and execute the SPARQL query

The result will be shown in tabs at the bottom of the screen.

View the result

The result – a SPARQL query (if you chose "Generate query SPARQL") or a result of its execution (if you chose "Execute query") – will appear at the bottom of the screen.

Here you can fine-tune the generated query if necessary.

Generated query:

Generated SPARQL query

Query results:

image

Continue exploring

You can build more complex queries for searching for objects of multiple classes (nodes) connected by relationships, ...

image

Additional Information