Query Examples
Operator-curated SQL / KQL / Spark snippets attached to data entities and terms — the canonical "how to use this dataset" surface.
Query Examples are operator-curated query snippets — typically SQL, but anything that reads as a "how the team uses this dataset" example — attached to one or more data entities and optionally linked to glossary terms. They turn the catalog from "what we have" into "what we have and how to use it", without forcing readers to dig into a wiki or ping the team that owns the data.
Query Examples is the first sub-surface of the Data Modelling section.
What you can do
Author and edit snippets with a name, description, and the query body. The description doubles as a "prompt"-style explanation of intent.
Link a snippet to one or more data entities (tables, views, files) so it shows up on the entity's detail page as one of the canonical examples.
Link a snippet to glossary terms so terminology + canonical usage stay close to each other.
Search the catalog of snippets with a dedicated faceted search that supports filters, the same shape as the main catalog search.
Get search suggestions as you type — the top five matching snippet titles for a query string.
UI walkthrough
Open Data Modelling → Query Examples from the top-level navigation (/data-modelling/query-examples). The list view shows every snippet the user is allowed to read, with a search box and an "Add query example" button. The button is gated by the QUERY_EXAMPLE_CREATE permission — users without it see the list but no create entry-point.

List page (
/data-modelling/query-examples) — all snippets, with search, total count, and the create button.Details / edit page (
/data-modelling/query-examples/{id}) — the snippet's full body, its description, and the linked data entities and terms. Edit and delete actions are gated byQUERY_EXAMPLE_UPDATEandQUERY_EXAMPLE_DELETErespectively.On a dataset's detail page — Query Examples linked to that dataset surface in the dataset's "Query Examples" tab; operators with
QUERY_EXAMPLE_DATASET_CREATEcan attach existing snippets, andQUERY_EXAMPLE_DATASET_DELETEusers can detach.On a term's detail page — same pattern, gated by
QUERY_EXAMPLE_TERM_CREATEandQUERY_EXAMPLE_TERM_DELETE.
Permissions (RBAC)
Seven permissions on the Query Example surface, all configurable on roles via the standard authorization model (see Authorization → Roles):
QUERY_EXAMPLE_CREATE
Create a new snippet (the "Add query example" button on the list page).
QUERY_EXAMPLE_UPDATE
Edit an existing snippet.
QUERY_EXAMPLE_DELETE
Delete an existing snippet.
QUERY_EXAMPLE_DATASET_CREATE
Attach a snippet to a dataset (entity ↔ snippet link).
QUERY_EXAMPLE_DATASET_DELETE
Detach a snippet from a dataset.
QUERY_EXAMPLE_TERM_CREATE
Attach a snippet to a glossary term (term ↔ snippet link).
QUERY_EXAMPLE_TERM_DELETE
Detach a snippet from a glossary term.
API surface
The full HTTP API for Query Examples is documented at API Reference → Query Examples — 16 endpoints across three groups (CRUD, faceted search, per-entity/per-term lookup and linking), exposed by QueryExampleController and the Data Entity / Term controllers, with the seven QUERY_EXAMPLE_* permissions called out alongside the gated endpoints. To call them outside the in-app UI, authenticate with a server-to-server (S2S) API key.
Term-linking workflow
Glossary terms and Query Examples reinforce each other: a term defines what a concept is (e.g., "active customer"); a query example shows how to compute it against your real datasets. The platform supports both directions:
From a term's detail page, attach an existing Query Example. The term gains a "Query Examples" cluster surfacing the snippet alongside the linked datasets.
From a snippet's detail page, link the snippet to one or more terms. The snippet gains a "Terms" cluster.
The dedicated Query Example faceted search exposes a Terms facet — narrow snippets to ones that target a specific glossary term.
This closes the catalog loop: a reader landing on the term finds the canonical snippet; a reader landing on the snippet finds the term it implements.
Where to next
Data Modelling overview — parent section; pairs Query Examples with Relationships.
Relationships — the other Data Modelling sub-surface.
Authorization → Roles — wire the seven
QUERY_EXAMPLE_*permissions onto your roles.API reference — the full Ingress / management API.
Last updated