Skip to main content
Creates a stream object that binds to an external change or message feed and defines the schema of its rows. The source kind is determined by the location the stream references:
  • Kafka: the stream binds to a topic and tracks consumer offsets per partition.
  • Postgres: the stream binds to a table and owns a logical replication slot on the source. See the Postgres CDC guide.
  • MongoDB: the stream binds to a collection and tracks a change-stream position. See the MongoDB CDC guide.
Any stream can be read with READ_STREAM. Postgres and MongoDB streams are usually consumed by a CDC table, which applies the changes continuously. Stream metadata is visible in information_schema.streams.

Kafka streams

Kafka stream types

For RAW_TEXT and BINARY stream types, define a single column named data with the matching type.

Postgres streams

Private Preview FeatureThis feature is currently in private preview. Contact support@firebolt.io to request early access.
CREATE STREAM connects to the source and creates the stream’s logical replication slot. If the source table is partitioned, leaf partitions are discovered automatically and one slot is created per leaf, each requiring a dedicated publication; see Partitioned source tables.

MongoDB streams

Private Preview FeatureThis feature is currently in private preview. Contact support@firebolt.io to request early access.

ALTER STREAM

ALTER STREAM applies to Kafka streams only. For Postgres and MongoDB streams, schema changes are drop-and-recreate. Reposition a Kafka stream’s consumer offset on a partition:
Add a column to a Kafka stream’s schema:

DROP STREAM

Removes the stream definition and its tracked position. Data already ingested into Firebolt tables is not affected. Source-side effects:
  • Kafka: none; the topic is untouched.
  • Postgres: the stream’s replication slot (or slots, for a partitioned source) is dropped on the source, so it stops retaining WAL. If the source is unreachable, the stream is still dropped and the error message names the leftover slot for manual removal.
  • MongoDB: none; change streams hold no server-side resource.
Drop or suspend any CDC table consuming the stream first; without its stream, the table’s ingest worker cannot make progress and reports errors in information_schema.cdc_ingests.