Does Okera support lateral views?
Okera does not have native support for lateral views so view creation needs to be executed outside Okera as an External View.
- Since this view is executed outside of Okera, the user must have the prerequisite privileges on the underlying tables that make up the Lateral View.
- These steps also assume you have a common HMS database being used by both the Okera enabled and non-Okera enabled Hive/EMR clusters.
You can take the following simple steps to make use a lateral view as an external Okera view:
- Start up an EMR cluster without ODAS enabled.
- Use this non-Okera EMR cluster to create the lateral view.
- Using DbCli or the WebUI workspace, define this view as an external view as:
ALTER TABLE dev_cerebro_views.lateral_view_test SET TBLPROPERTIES('cerebro.external.view'='true');
- Start a Okera enabled EMR cluster, and use the view.