Create hive table using “as select” or “like”

0 votes
11 views
asked Mar 1, 2017 in Hive by anonymous

1 Answer

0 votes
answered Mar 1, 2017 by Hemanshu

Create Table as select (CTAS) is possible in Hive.

You can try out below command:

Create table syntax

CREATE TABLE new_test AS select * from source where col=1

Create table syntax with Customized delimiter

CREATE TABLE new_test row format delimited fields terminated by '|' STORED AS RCFile AS select * from source where col=1

    ...