Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Query in Studio

Query a Data Product's semantic models in Studio to confirm it exposes the right data.

After you have found and started evaluating a product, query its semantic models directly in Studio to confirm it exposes the right data for your use. In Orders Analytics Platform, this is where you validate customer, sales, and metric data before consuming it through BI tools, APIs, applications, or a saved perspective.

From the product page or its context card in the Hub, select Explore. Studio asks how you want to query the product and offers four ways: Visual Builder, GraphQL, Semantic SQL, and Source SQL. To skip this step, select the arrow next to Explore on the product page and pick a mode directly. If the product requires a data-sharing agreement, Studio first shows a Review agreement page; select Accept and continue to proceed, or Go back.

Studio asks how you want to query the product

Visual Builder, Semantic SQL, and GraphQL all go through the semantic layer, so they apply the same governed definitions and return the same result for the same selection; Source SQL bypasses the semantic layer to query the underlying physical models directly. Pick the one that confirms the shape, fields, and behavior fastest. Each query opens in its own tab; select + to start another.

Visual builder

A point-and-click interface, for validating fields, filters, and result shape without writing query syntax. The left panel lists the product's semantic models; expand one and select dimensions, measures, and segments to add them. Select the info (i) icon next to a model to see its description, joins, owner, and tags first. Use Select all / Clear all on a model section to add or drop every field at once, and switch to the Selected tab to review your picks: search by name, with a running count of Dimensions and Measures selected.

Select Filters to scope the result (grouped into Dimensions and Measures, combinable with AND/OR), and the query settings panel to shape it:

Setting
Why you would use it

Sort by

Bring the rows you care about to the top; ASC or DESC, multiple fields for tie-breaking

Limit

Keep the preview responsive: 100, 500, 1K, 5K, or 10K rows

Offset

Page through a large result beyond the first batch

Zone

Align time fields to the time zone your analysis uses

Select Run; results appear in the Results tab, next to Visualize, Source SQL, and REST API. The Source SQL tab shows the generated SQL, and the REST API tab shows how to run the same query programmatically (Bearer token required). See APIs.

Semantic SQL

Write SQL against the semantic model names (not raw warehouse tables). The engine translates it into optimized warehouse SQL, applying the joins, aggregations, and access controls the model defines. As a result, you cannot reference raw tables or warehouse-specific syntax, and selected fields must be dimensions or measures the model exposes.

Explore the surface first, then query:

Use model names in FROM, dimensions in SELECT and GROUP BY, and wrap each measure in MEASURE(<model>.<measure>):

Filters, limits, and ordering behave the same as in the visual builder. The Source SQL and REST API tabs work here too. In-context help icons cover Semantic SQL dialect, syntax, and usage if you need a reminder mid-query.

Source SQL

A Workbench-like experience for querying the product's physical models directly: schema navigation, a query editor, and a results panel, without going through the semantic layer. Use it to inspect or validate source data ahead of, or independent from, the semantic model, the same physical-source view available on the build side in Workbench.

The left panel lists each model with its schema and column count; expand a model to see its columns. Use model names in FROM and column names in SELECT and GROUP BY, for example SELECT * FROM bronzev1.orders LIMIT 10;.

Source SQL mode with the model list and query results

Source SQL mode lists only queryable models. Non-queryable models, such as embedded models, are not visible.

This is a separate mode from the Source SQL tab under Visual builder and Semantic SQL, which shows the generated SQL for a semantic query result. Source SQL mode queries physical tables directly, before any semantic translation.

GraphQL

Write or paste GraphQL when you need full control over the query structure, or to mirror what a downstream application sends. The playground points at the product's native GraphQL endpoint, so what you test here is what a downstream application calls. The editor has a query editor, a Variables panel, a Headers panel (set the Authorization Bearer token here), and a browsable Docs schema reference. The root table field takes arguments that mirror the visual builder: where, limit, offset, timezone, orderBy, ungrouped.

For the full GraphQL, Semantic SQL, and REST references, see the query reference in References.

Read query status

A Zap icon on the result indicates whether it was reused from cache (violet, tooltip "Cache: Yes") or executed fresh (a grayed-out, crossed-out Zap, tooltip "Cache: No"), so you know whether you're looking at a cached number before you cite it. If a query fails to load, the error box now shows the backend error code and message alongside the generic error, so you can tell a permissions issue from a syntax one.

What to validate

Before consuming a product downstream, use a query to confirm:

  • The required fields exist as dimensions or measures.

  • The results match your use case: decimal values render at full precision and date dimensions typed as string display as string, not epoch, matching source SQL.

  • Filters scope correctly to the segment, date range, or condition you need.

  • The result size is manageable (limit, offset, export).

  • The query is worth reusing, in which case save it as a perspective. You can save a perspective from any of the four modes.

Outcome

Querying is done when you have confirmed the semantic outputs suit your use. From here, move into an activation path: BI tools, database clients, APIs, applications, AI workflows, or a saved perspective.

Last updated

Was this helpful?