Home > Software engineering >  Snowflake schema creation from a share
Snowflake schema creation from a share

Time:04-03

Wanted to confirm if it is not possible to create a schema from a share.

I see from the documentation that once a share (from a schema not the entire database) is created/enabled by the provider account,I/the consumer account can only leverage the share by creating a new database.

I/Consumer already have a snowflake database & would like to just point the schema from the provider that is enabled as share to a new schema on my side in the existing database. This avoids the need to maintain multiple databases.

Br, Noor.

CodePudding user response:

It is not possible.

In consumer side, the ff. command is used to consume a share:

CREATE DATABASE <name> FROM SHARE <provider_account>.<share_name>;

Hence, consumption can only be done in database level. This effectively creates a read-only database (unlike regular/local databases), all of its objects are controlled by the provider.

Additionally, IMPORTED PRIVILEGES is used to grant roles in consumer side access on shared database. Cannot grant this privilege on a Schema.

  • Related