> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/consume/v1/evaluate/query-in-studio.md).

# Query in Studio

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, select **Explore**. The menu offers four ways to query. 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.

## 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 and measures 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:

<table><thead><tr><th width="122.77386474609375">Setting</th><th>Why you would use it</th></tr></thead><tbody><tr><td>Sort by</td><td>Bring the rows you care about to the top; ASC or DESC, multiple fields for tie-breaking</td></tr><tr><td>Limit</td><td>Keep the preview responsive: 100, 500, 1K, 5K, or 10K rows</td></tr><tr><td>Offset</td><td>Page through a large result beyond the first batch</td></tr><tr><td>Zone</td><td>Align time fields to the time zone your analysis uses</td></tr></tbody></table>

Select **Run**; results appear in the **Results** tab. 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](/consume/v1/activate/apis.md).

## 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:

```sql
SHOW TABLES;          -- semantic models the product exposes
DESCRIBE customer_profile;   -- its dimensions and measures
```

```sql
SELECT customer_profile.customer_id, customer_profile.region_name, customer_profile.total_revenue
FROM customer_profile
WHERE customer_profile.is_active_customer = true
LIMIT 100;
```

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](https://v2.dataos.info/build/understand/explore-data/workbench).

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`.

```graphql
{
  table(limit: 100, timezone: "UTC",
        where: { customer_profile: { is_active_customer: { equals: true } } }) {
    customer_profile { customer_id region_name total_revenue }
  }
}
```

For the full GraphQL, Semantic SQL, and REST references, see the [query reference](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/querying-data-products) 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 greyed-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](/consume/v1/evaluate/query-in-studio/save-as-perspective.md).

## Outcome

Querying is done when you have confirmed the semantic outputs suit your use. From here, move into an [activation path](/consume/v1/activate/overview.md): BI tools, database clients, APIs, applications, AI workflows, or a saved [perspective](/consume/v1/evaluate/query-in-studio/save-as-perspective.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/consume/v1/evaluate/query-in-studio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
