Add Datashare to existing database in redshift

500 Views Asked by At

I created a datashare in Serverless cluster.

Now I want to add that datashare in Provisioned cluster. Simplest way is to create a new database using below command.

CREATE DATABASE temp_db FROM DATASHARE temp_share OF NAMESPACE '<producer-namespace>';

But I want to add that DATASHARE to my existing dev database.

How can I achieve that?

1

There are 1 best solutions below

0
On

I dont think we have an option to do that. Instead of using datashare schema in the dev database, I think you can try below to fit your need:

  1. You can execute the query from your dev database to datashare database. Just provide the full path like "databasename"."schemaname"."tablename"
  2. I dont think it is possible or not. Just drop dev schema first and recreate by your above SQL.
  3. Or you can create the view inside dev schema and that view will select data from datashare objects.

I knew it has been 8 months ago. But I hope my answer can hope someone else if they meet this case.