> 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/activate/querying-data-products.md).

# Querying Data Products

How querying a Data Product works, and where each query path leads.

Every activation path queries the same thing: the product's [semantic layer](https://v2.dataos.info/references/glossary). You write SQL or a structured query against [semantic model](https://v2.dataos.info/consume/evaluate/assets/semantics.md) names and their dimensions and measures; the engine resolves joins, aggregations, and access policies the same way described in [Query in Studio](https://v2.dataos.info/consume/evaluate/query-in-studio.md). You never write raw warehouse SQL or define joins yourself.

This page is the thin map. Each query surface has its own page, and the full query reference lives in References.

## How a query resolves

```
Your query  ->  semantic layer  ->  warehouse SQL (joins, aggregations, policies applied)  ->  result
```

Two things follow from this:

* You query **logical** model names and fields, not physical tables. Selected fields must be dimensions or measures the model exposes.
* Measures are wrapped with `MEASURE()` (or a matching aggregate). Dimensions are plain columns you select, filter, group, and order by.

## Where to query

<table><thead><tr><th width="457.111083984375">You want to</th><th>Use</th></tr></thead><tbody><tr><td>Validate fields and filters in the browser</td><td><a href="https://v2.dataos.info/consume/evaluate/query-in-studio.md">Query in Studio</a> (visual builder, Semantic SQL, GraphQL)</td></tr><tr><td>Query from a desktop SQL tool over the MySQL protocol</td><td><a href="https://v2.dataos.info/consume/activate/database-clients.md">Database clients</a></td></tr><tr><td>Call the product programmatically from code</td><td><a href="https://v2.dataos.info/consume/activate/apis.md">APIs</a></td></tr><tr><td>Save a query for reuse and serving</td><td><a href="https://v2.dataos.info/consume/evaluate/query-in-studio/save-as-perspective.md">Save as Perspective</a></td></tr></tbody></table>

For the full query reference, including the SQL form, aggregate functions, join syntax, filter operators, and the semantic query lifecycle, see the [query reference](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products) in References.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/consume/activate/querying-data-products.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
