Disaster Recovery, Backup and Data Replication · Topic 5 of 9

Replication Impact on Streams, Tasks, Stages, Pipes, History and Iceberg

How account replication affects streams, tasks, stages, pipes, cloned objects, usage history and Iceberg tables, and what to prepare before failover.

  • 5 min
In a nutshell
  • Streams: same database sources; stale primary means stale replica; append only streams are not supported.
  • Tasks: suspended after database replication; group replication keeps RESUMED only if the owner role exists and it was resumed at refresh start.
  • Stages and pipes replicate only through groups; user and table stage files do not.

What it is

Pipelines are the hardest part of a failover. Streams hold offsets, tasks hold schedules, pipes hold load history, and stages point at files. Each behaves differently in a secondary, and each needs something done before the target can take over.

This page lists the behavior of each, in the form the exam asks: what replicates, in what state, and what you must do.

Pipelinestream, task, pipe, stagerefreshSecondarydefinitions, state suspendedfailoverCheck and resumetasks, pipes, stage access

How it works

Streams

  • Replicated streams track tables and views in the same database.
  • Unsupported sources: external tables, tables or views in other databases (unless both databases are in the same group), and tables or views in shared databases.
  • Append only streams are not supported on replicated sources.
  • Replication fails if the stream source is unsupported or has been dropped.
  • If a primary stream is stale, its replica is stale and unreadable. Recreate the stream on the primary with CREATE OR REPLACE STREAM.
  • A stream and its destination table in separate databases that do not fail over together can cause duplicate rows.
  • Directory table streams are supported when stage, pipe and load history replication is enabled.

Tasks

Behavior depends on the method.

PointGroup replicationDatabase replication
Version capturedState at the start of the refreshLatest task version
State in the targetRESUMED only if resumed on the primary at refresh start and the owner role exists in the target; otherwise SUSPENDEDAlways SUSPENDED
GrantsReplicate if the owner role exists in the targetNo task grants replicate

For database replication, a task that was created but never resumed or run is not replicated, and a task dropped after it ran is not replicated.

After failover, tasks do not run until the secondary is promoted. Resumed standalone tasks and graphs with a resumed root are then scheduled gradually. Child tasks do not run unless the root is resumed. A task that has a stream in its WHEN clause should be in the same database as the stream, or both databases in the same failover group.

Watch out

After database replication, every task in the target is suspended. A DR plan must include resuming the root tasks, or the pipelines stay quiet after a failover.

Stages

Stage replication works only through replication or failover groups, not through plain database replication.

Stage typeWhat replicates
External stageThe definition; files stay in external storage
Internal named stageFiles only if a directory table is enabled on the stage
User stage and table stageFiles do not replicate
  • A refresh fails if a directory table contains a file larger than 5 GB.
  • A directory table on a replicated stage cannot be disabled afterward.
  • Named external stages that use storage integrations need a trust relationship configured for the target storage integration before failover.
  • Directory table automated refresh must be configured on the secondary before failover.

Pipes

Pipe replication also works only through groups.

  • Copy history replicates only when the pipe and its target table are in the same group.
  • Load history replicates only after the latest table truncate.
  • Inbound notification integrations of type QUEUE do not replicate. MULTI_QUEUE integrations replicate when NOTIFICATION INTEGRATIONS is in ALLOWED_INTEGRATION_TYPES.
  • Auto ingest pipes in the secondary need their notifications configured before failover.
  • After failover, check pipes with SYSTEM$PIPE_STATUS when they are not in the expected state.
  • Snowpipe with the Kafka connector is not supported; Snowpipe Streaming with the Kafka connector is.

Cloned objects

A clone replicates logically, sharing micro partitions with its source, only if the original and the clone are in the same replication or failover group. Otherwise the clone data replicates physically and adds storage in the target.

  • Clone groups in the source may not match those in the target.
  • Some micro partitions may not be shareable, which adds storage.

So storage in the target can exceed what a zero copy clone suggests. Keep original and clone together in one group.

Historical usage data

History does not replicate. Each account keeps its own. This includes COPY_HISTORY, LOGIN_HISTORY and QUERY_HISTORY, as views and as table functions. After failover, the new primary has no query or login history from the old one.

Time Travel and Fail-safe data are kept independently on secondaries, and the retention period starts at the secondary's refresh.

Old primaryQUERY_HISTORY, LOGIN_HISTORYfailoverNew primaryown history onlykeepExport or archiveif audit needs it

For audit needs, copy the history you must keep to a table or external location before a planned failover.

Iceberg tables

  • Only Snowflake managed Iceberg tables replicate. Converted Iceberg tables are skipped during refresh.
  • The storage location used for replication must be in the same region as the target account.
  • Dropping or altering a storage location used by the external volume on the primary can cause refresh failures.
  • Secondary Iceberg tables are read only until promotion.
  • The primary's directory hierarchy is kept, and replication costs apply.

Common mistakes

Assuming tasks run in the target after a refresh. With database replication they arrive suspended.

Replicating stages with plain database replication. Stages and pipes need a group.

Expecting files in user or table stages to appear. They do not replicate.

Expecting query and login history in the DR account. History is per account.

Replicating a stream on a table in another database. It fails unless both databases share a group.

What to remember for the exam

  • Streams: same database sources; stale primary means stale replica; append only streams are not supported.
  • Tasks: suspended after database replication; group replication keeps RESUMED only if the owner role exists and it was resumed at refresh start.
  • Stages and pipes replicate only through groups; user and table stage files do not.
  • Clones stay zero copy in the target only when clone and original share a group.
  • Usage history does not replicate; Time Travel starts at the secondary's refresh.
  • Iceberg: only Snowflake managed tables replicate.

Check yourself

  • Why are tasks not running in a DR account after database replication?

    Replicated tasks are always suspended, so root tasks must be resumed after promotion.

  • Which stage files replicate?

    Internal named stage files with a directory table enabled; external stage files stay in external storage, and user and table stage files do not replicate.

  • Which Iceberg tables replicate?

    Only Snowflake managed Iceberg tables; converted tables are skipped.

Topic 5 of 9 in Disaster Recovery, Backup and Data Replication

Test yourself on Disaster Recovery, Backup and Data Replication

The full Snowflake ADA-C02 question bank has 814 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.