> 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/references/interfaces/apis/data-product-apis/querying-data-products/advanced/choosing-a-query-method.md).

# Choosing a query method

Compare the available query interfaces and select the right fit for your integration.

All semantic query methods use the same governed definitions. Choose based on consumer workflow and the controls the query needs, not based on different business logic.

| Capability                             | REST                    | Semantic SQL            | GraphQL                | Metrics            | Source SQL           |
| -------------------------------------- | ----------------------- | ----------------------- | ---------------------- | ------------------ | -------------------- |
| Governed measures and dimensions       | Yes                     | Yes                     | Yes                    | Yes, one named KPI | No                   |
| Best for generated application queries | Best fit                | Possible                | Good for typed clients | Best for KPI calls | Avoid                |
| Schema introspection                   | Via metadata            | Via metadata            | Native                 | Via metadata       | Via metadata         |
| Complex filters                        | Full structured filters | SQL `WHERE` / `HAVING`  | Typed `where`          | POST filters       | Warehouse SQL        |
| Segments                               | Native                  | Boolean condition       | Recreate with `where`  | Auto-applied       | No semantic segments |
| Inline result                          | No                      | No                      | Usually                | No                 | No                   |
| Parquet result                         | Yes                     | Yes                     | No inline export       | Yes                | Yes                  |
| Physical columns / warehouse functions | No                      | Limited semantic subset | No                     | No                 | Yes                  |

## Recommended decision order

1. If the consumer asks for one approved KPI, start with **Metrics**.
2. For application-generated analytical queries, use **REST**.
3. For SQL-native exploration over governed members, use **Semantic SQL**.
4. For a typed frontend query and nested JSON, use **GraphQL**.
5. Use **Source SQL** only when the semantic layer cannot represent the question.

{% hint style="warning" %}
Source SQL is an escape hatch, not the default power-user interface. It exposes physical contracts and warehouse dialect details that semantic interfaces deliberately hide.
{% endhint %}


---

# 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/references/interfaces/apis/data-product-apis/querying-data-products/advanced/choosing-a-query-method.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.
