Query data

A dataset's left-hand sidebar lists the ways to query it under Data queries. SPARQL is there by default; Elasticsearch and GraphQL appear only where the dataset or the instance supports them.

Run a SPARQL query

  1. Open the dataset and click SPARQL under Data queries.
  2. Write the query in the editor, which autocompletes and reports errors as you type.
  3. Pick what runs it from the Endpoint menu. Speedy, TriplyDB's built-in engine, is the default and needs no setup. Any SPARQL service the dataset runs is listed beside it; see Manage services for starting one.
  4. Click Execute query, or press Ctrl+Enter (⌘+Enter on a Mac).

The results appear below the editor, where they can be shown as a table or as one of the other visualizations on offer. To keep the query, click Save query; see Work with saved queries for what a saved query gives you.

New to SPARQL? Start with SPARQL: the basics.

Search the text with Elasticsearch

Elasticsearch appears under Data queries only when the dataset runs an Elasticsearch service; see Manage services.

  1. Open the dataset and click Elasticsearch.
  2. Type a term in the Search field and press Enter.

This works like a search engine: it returns every node that contains the term, or contains it in one of its properties. For more control, write a query in the Elasticsearch Query DSL instead.

Query with GraphQL

GraphQL appears under Data queries on instances where it is enabled. It queries a schema that TriplyDB generates from the SHACL shapes in the dataset, so the dataset needs those shapes first.

  1. Open the dataset and click GraphQL.
  2. Write the query and run it.

For the schema, the queries it accepts, filtering and pagination, see GraphQL.