Implement CREATE AS SELECT in Impala

on_the_shores_of_linux_sea picture on_the_shores_of_linux_sea · Oct 23, 2013 · Viewed 7.8k times · Source

Pls help me on how to implement CREATE TABLE AS SELECT

For simple create table t1 as select * from t2; I can implement as

Create table t1 like t2;
insert into t1 as select * from t2;

But how to implement create table t1 as select c1,c2,c3 from t2;

Is there any way to implement this in impala?

Answer

Nickolay picture Nickolay · May 25, 2015

As mentioned in the comments, CREATE TABLE AS SELECT is supported in Impala since 1.2: documentation, JIRA ticket.