Skip to main content
Last updated on

table_streams

Overview

Records the definition and state of every Table Stream in the cluster. Each row corresponds to one Stream. See Table Stream Basics for usage.

Database

information_schema

Table Information

ColumnTypeDescription
DB_NAMEvarchar(64)The database of the Stream
STREAM_NAMEvarchar(64)Stream name
STREAM_IDbigintStream ID
STREAM_TYPEvarchar(64)Stream type; Streams on internal tables are OLAP_TABLE_STREAM
CONSUME_TYPEvarchar(64)Consumption type: APPEND_ONLY, MIN_DELTA, DETAIL
STREAM_COMMENTstringThe comment of the Stream
BASE_TABLE_NAMEvarchar(64)Base table name
BASE_TABLE_DBvarchar(64)The database of the base table
BASE_TABLE_CTLvarchar(64)The catalog of the base table
BASE_TABLE_TYPEvarchar(64)Base table type
ENABLEDbooleanWhether the Stream is usable
IS_STALEbooleanWhether the Stream has become stale (for example, its change records were cleaned up and it can no longer read from its consumption offset)
STALE_REASONstringThe reason for being stale; N/A when not stale

Examples

SELECT STREAM_NAME, CONSUME_TYPE, BASE_TABLE_DB, BASE_TABLE_NAME, ENABLED, IS_STALE, STALE_REASON
FROM information_schema.table_streams
WHERE DB_NAME = 'demo';
+---------------+--------------+---------------+-----------------+---------+----------+--------------+
| STREAM_NAME | CONSUME_TYPE | BASE_TABLE_DB | BASE_TABLE_NAME | ENABLED | IS_STALE | STALE_REASON |
+---------------+--------------+---------------+-----------------+---------+----------+--------------+
| orders_stream | MIN_DELTA | demo | orders | 1 | 0 | N/A |
+---------------+--------------+---------------+-----------------+---------+----------+--------------+