---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/select/streaming.md?version=v25.4
  - https://ydb.tech/docs/ru/yql/reference/syntax/select/streaming.md?version=v25.4
  - 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 reads from a topic

You can read from a [topic](https://ydb.tech/docs/en/concepts/datamodel/topic.md?version=v25.4) with a regular `SELECT` without creating a [streaming query](https://ydb.tech/docs/en/concepts/streaming-query.md?version=v25.4). Set `STREAMING = TRUE` in the `WITH` block and limit output rows with `LIMIT`; otherwise the query does not complete.

{% note warning %}

Use this only for debugging and inspecting topic data. For production workloads, create streaming queries with [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=v25.4).

{% 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=v25.4), 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=v25.4) — recipe with more examples
* [Streaming queries](https://ydb.tech/docs/en/concepts/streaming-query.md?version=v25.4)
* [CREATE STREAMING QUERY](https://ydb.tech/docs/en/yql/reference/syntax/create-streaming-query.md?version=v25.4)
