Skip to main content
A streaming job is a job that creates a materialized view, a table, a sink, or an index. When background DDL is enabled via SET BACKGROUND_DDL, these creation commands return immediately while the actual backfill runs in the background. The WAIT command lets you pause your session until a specific job — or all in-progress jobs — complete.

Syntax

  • With no target, WAIT blocks until all background streaming jobs finish (timeout: 2 hours).
  • With a target, WAIT blocks until the specified object’s creation job finishes.

Parameters

Examples

Wait for all background jobs to finish:
Start a materialized view creation in the background, then wait for it to complete before querying:
Wait for a specific table’s creation to finish:

SET BACKGROUND_DDL

SHOW JOBS

CANCEL JOBS