---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/select/streaming.md?version=v26.3
  - https://ydb.tech/docs/ru/yql/reference/syntax/select/streaming.md?version=v26.3
  - href: https://ydb.tech/docs/en/yql/reference/syntax/select/streaming.md?version=v26.3
    type: text/markdown
    title: Markdown version
  - href: https://ydb.tech/docs/en/llms.txt?revision=962422e645f28cc9d83f45f9bb5846da6ee2ca46&version=v26.3
    rel: describedby
sourcePath: en/core/yql/reference/syntax/select/streaming.md
---
> **Documentation capabilities:** Search, read sources, and browse this documentation: [agent guide](https://ydb.tech/docs/docs-api/agent/overview?project=ydb-platform--ydb&lang=en&version=v26.3).

> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt?revision=962422e645f28cc9d83f45f9bb5846da6ee2ca46&version=v26.3

# Streaming read from a topic

You can read data from a [topic](https://ydb.tech/docs/en/concepts/datamodel/topic.md?version=v26.3) using a regular `SELECT` without creating a [streaming query](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=v26.3). To do this, specify `STREAMING = "TRUE"` in the `WITH` block and set a limit on the number of output rows via `LIMIT`; otherwise, the query will not complete.

{% note warning %}

This method is intended only for debugging and checking data in a topic. For production processes, create streaming queries using [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=v26.3).

{% endnote %}

{% note info %}

In the examples:

- `ext_source` is a pre-created [external data source](https://ydb.tech/docs/en/concepts/datamodel/external_data_source.md?version=v26.3)
- `input_topic` is a local or external topic.

For more information, see [local and external topics](https://ydb.tech/docs/en/concepts/query_execution/topics.md?version=v26.3#local-external-topics).

{% endnote %}

## Example


```yql
SELECT
    Data
FROM
    ext_source.input_topic -- or local topic input_topic
WITH (
    FORMAT = raw,
    SCHEMA = (
        Data String
    ),
    STREAMING = "TRUE"
)
LIMIT 1
```


## See also

* [Debug reads from a topic](https://ydb.tech/docs/en/recipes/streaming_queries/debug-read.md?version=v26.3) — recipe with additional examples
* [Streaming queries](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=v26.3)
* [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=v26.3)
