Skip to main content

ALTER STREAM CAPTURE

Description

Modifies the configurations for a Stream Capture. Currently supports pausing the stream, resuming the stream, and updating the minimum sync frequency.

Note that the SQL statement does not end with ;

Syntax

ALTER STREAM CAPTURE <name>
[ SET STATE = { 'PAUSE' | 'RESUME' } ]
[ SET SOURCE = <string> ]
[ SET CLUSTER = <string> ]
[ SET PERFORMANCE_PROFILE = { 'BALANCED' | 'FASTEST_READ' | 'FASTEST_WRITE' } ]
[ SET MIN_SYNC_FREQUENCY_MINS = <integer> ]
[ SET ADVANCED_CONFIGS]

Sample response

Examples

Alter Source

ALTER STREAM CAPTURE testStreamCapture
SET SOURCE = 'kafka_source_name'
WITH
'kafka.topic.name' = 'kafka-topic-name',
'kafka.startingOffsets' = 'latest',
'kafka.topic.schema.name' = 'kafka-topic-name-value'

Alter Advanced Configurations

ALTER STREAM CAPTURE testStreamCapture
SET ADVANCED_CONFIGS
WITH
'streamCapture.advancedConfig1' = 'value1',
'streamCapture.advancedConfig2' = 'value2'

Required parameters

  • <name>: Identifier for the Stream Capture.

Optional parameters

Use one optional parameter

You must use exactly one of the optional parameters in the query.

  • STATE: Pause or resume the table.
  • SOURCE: Specify the name of the new source to use for the Stream Capture.
    • Important: Read the docs on editing sources here for details on usage and limitations.
  • CLUSTER: Specify the name of an existing Cluster that will run the Stream Capture.
  • PERFORMANCE_PROFILE: Specify the desired Performance Profile to optimize how the Stream Capture writes data to the table.
    • Only available for Stream Captures in Append-only write mode.
  • MIN_SYNC_FREQUENCY_MINS: Specify the minimum number of minutes between Stream Capture triggers.
  • ADVANCED_CONFIGS: Include this parameter to update the advanced configurations for the Stream Capture. Then, specify the updated advanced configurations after the WITH clause as comma-separated key value pairs.
    • Important: Any existing advanced configurations that should remain unchanged must also be included in the request. Omitting any existing configurations will result in their removal.

Advanced Configs

Include advanced configs after WITH as type String only when doing SET ADVANCED_CONFIGS.

  • streamCapture.delayThreshold.numSyncIntervals: This value is multiplied by the Sync Frequency to determine the delay threshold. When a sync's duration surpasses the delay threshold, the Stream Capture is considered delayed. This value cannot be negative. Set this value to 0 to disable the Delayed state for this Stream Capture.
    • Default: 0 (Delayed state & notifications disabled)

Special parameters

Include special parameters after WITH as type String.

Editing the source

Include these parameters when editing the source of the Stream Capture.

  • kafka.topic.name: Specify the name of the new source topic.
  • kafka.startingOffsets: [Optional] Specify the start point for ingestion from the new Kafka source as 'earliest' or 'latest'. Default is 'earliest'.
  • kafka.topic.schema.name: Specify the name of the schema in your schema registry to use for the source data (for Kafka sources with a schema registry).
    • If your Schema Registry uses Schema Contexts, use the format: ':.context.subcontext:schemaName'. Example: ':.prod-us:schema1'

Delays

  • streamCapture.delayThreshold.numSyncIntervals: This value is multiplied by the Sync Frequency to determine the delay threshold. When a sync's duration surpasses the delay threshold, the Stream Capture is considered delayed. This value cannot be negative. Set this value to 0 to disable the Delayed state for this Stream Capture.

Deduplication

  • streamCapture.deduplicationPolicy: For append-only Stream Captures, deduplicate records based on the record key. Options:
    • 'none': No deduplication
    • 'drop': Drop duplicate records