Pavan
Pavan

Reputation: 75

Migrate Streams and Tasks (Snowflake)

Is there a way to migrate(Copy) Streams and Task to another account in Snowflake. I can see streams and tasks copied to another DB if I clone a DB within the same account.

Upvotes: 0

Views: 271

Answers (1)

Lukasz Szozda
Lukasz Szozda

Reputation: 175566

Depending what has to be moved, there is an option to get DDL and run on second environment:

GET_DDL:

Returns a DDL statement that can be used to recreate the specified object. For databases and schemas, GET_DDL is recursive, i.e. it returns the DDL statements for recreating all supported objects within the specified database/schema.

-- identifying tasks/streams
SHOW TASKS IN DATABASE ...;
SHOW STREAMS IN DATABASE...;

-- getting DDL for specific task/stream
SELECT GET_DDL('STREAM', <name>);
SELECT GET_DDL('TASK', <name>);

Upvotes: 1

Related Questions