I am running into strange behavior when attempting to share 2 schemas from a single database to a SNOWFLAKE READER ACCOUNT.
Assuming both schemas on the producer database are properly shared the commands to create the database and shares on the READER ACCOUNT would look something like:
CREATE DATABASE myDB_A from share producerAccount.Producer_SHARE_Schema_A;
CREATE DATABASE myDB_B from share producerAccount.Producer_SHARE_Schema_B;
Where
- Producer_SHARE_Schema_A is a share that looks like myDB.Schema_A and
- Producer_SHARE_Schema_B is a share that looks like myDB.Schema_B
What seems to happen is myDB_A will have Schema_A and when the second command is run, myDB_A also picks up Schema_B.
Ideally, we would need a command that allows us to add a second schema to the database, using an ALTER approach:
CREATE DATABASE myDB_A from share producerAccount.Producer_SHARE_Schema_A;
**ALTER DATABASE myDB_B ADD share producerAccount.Producer_SHARE_Schema_B**;
The final question... Is there a standardized method to add additional schemas to a shared database in a target READER ACCOUNT?
Thanks!