---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/select/streaming.md?version=main
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=main) using a regular `SELECT` without creating a [streaming query](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=main). 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=main).

{% 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=main)
- `input_topic` is a local or external topic.

For more information, see [local and external topics in streaming queries](https://ydb.tech/docs/en/dev/streaming-query/local-and-external-topics.md?version=main).

{% 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 reading from a topic](https://ydb.tech/docs/en/recipes/streaming_queries/debug-read.md?version=main) — recipe with additional examples
* [Streaming queries](https://ydb.tech/docs/en/concepts/streaming-query/streaming-query.md?version=main)
* [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=main)
