---
metadata:
  - name: generator
    content: Diplodoc Platform v5.56.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/select/streaming.md?version=v26.2
  - https://ydb.tech/docs/ru/yql/reference/syntax/select/streaming.md?version=v26.2
  - href: en/yql/reference/syntax/select/streaming.md
    type: text/markdown
    title: Markdown version
  - href: ../../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/yql/reference/syntax/select/streaming.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Streaming read from a topic

You can read data from a [topic](https://ydb.tech/docs/en/concepts/datamodel/topic.md?version=v26.2) using a regular `SELECT` without creating a [streaming query](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=v26.2). 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.2).

{% endnote %}

{% note info %}

In the examples, `ydb_source` is a pre-created [external data source](https://ydb.tech/docs/en/concepts/datamodel/external_data_source.md?version=v26.2), and `topic_name` is a topic available through it.

{% endnote %}

## Example


```yql
SELECT
    Data
FROM
    ydb_source.topic_name
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.2) — recipe with additional examples
* [Streaming queries](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=v26.2)
* [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=v26.2)
