How can we create a stream on a shared database object in Snowflake

I have a shared database in my snowflake account. using the shared database table i need to create my target table in scd type 2 format. generally in snowflake we use stream to create scd type 2 table, when i tried creating stream on shared table snowflake is throwing an error.

Kidly guide me how to create a stream on a shared table.

Upvotes: 1

Views: 1606

Answers (1)

Marcel
Marcel

Reputation: 2612

It should be possible, see here:

  1. https://docs.snowflake.com/en/user-guide/streams.html#streams-on-shared-tables
  2. https://docs.snowflake.com/en/user-guide/data-sharing-provider.html#enabling-data-consumers-to-create-table-streams-on-shared-tables

One pre-requisite is that the provider enables change tracking on the tables (second link). If this was the case, it would be helpful if you could please provide some code + error message.

Upvotes: 1

Related Questions