ONTOLOGY SPARQL QUERY

Executes a SPARQL query against a named ARC2-backed ontology store and returns the results as both a structured dataset and a plain string. Use this worker to interrogate any ontology loaded into the platform — count triples, traverse edges, filter nodes by property, or extract semantic relationships.

When to use

Tagged: arc2, knowledge-graph, ontology, rdf, semantic-query, sparql, triple-store.

Inputs

Label ID Type Default Required Description
Ontology Store Name ontology_store_name text Logical name of the target ontology store (e.g. ‘simulation’); the worker automatically prepends the ‘arc2_ontology_’ prefix, so pass only the short name used when the ontology was created.
SPARQL Query query text Full SPARQL SELECT (or ASK/CONSTRUCT) query string to execute against the store; note that ARC2 2.3 supports SPARQL 1.0 — use REGEX() instead of CONTAINS() and avoid COUNT(DISTINCT).

Outputs

Label ID Type Description
Status status text Human-readable execution status string — ‘success’ on completion or an error message describing why the query failed.
Results Dataset results_dataset dataset Query result rows returned as a structured dataset (tabular format), where each column corresponds to a bound SPARQL variable; empty array if the query returns no rows.
Results String results_string string Query results serialised as a plain string (e.g. JSON or delimited text), suitable for logging, display, or downstream text-processing workers; empty string on failure.

Disciplines

  • platform.ontology

Auto-generated from platform schema. Worker id: ontology_sparql_query. Schema hash: ef17eab6f0af. Hand-curated docs in workerexamples/ override this page when present.