Reputation: 1150
I am trying to create Views in our Amazon Redshift. The problem is, some of the base tables are not yet created by my partner, so I would like to create the views without them.
I found in this link that Oracle has a FORCE
keyword to solve this issue. However, it seems Redshift does not have it (or I am using it wrong).
CREATE OR REPLACE FORCE VIEW ....
returns a syntax error.
How can I create my Views without the base tables?
Upvotes: 1
Views: 382
Reputation: 4354
You need to create your view "WITH NO SCHEMA BINDING".
This will create a "late binding view" which doesn't check the underlying database objects, such as tables and other views.
Please see AWS documentation here https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html
Upvotes: 1