I'm using Airflow to orchestrate ETL. Many of the tasks have drop table
clauses that fail when a user creates a view without late-binding. Changing all tasks to drop cascade
is not an option.
Is there any way to force late-binding? Either by user permissions or Redshift configuration.
No, you cannot force all views to use late binding at the cluster or database level. You could create a stored procedure that uses the v_generate_view_ddl
view logic to get the DDL of all dependent views and automatically recreate them.
FWIW, I recommend not performing your ETL directly into user facing tables if you can possibly avoid it. Run the ETL against a staging schema that users cannot access and then "flip" the data into their schema(s) when it's loaded and prepped. You can use ATLER TABLE APPEND
to quickly do the flip.