Is it possible to do a
create table as select
using
row format delimited fields terminated by '|';
or to do a
create table like row format delimited fields terminated by '|';
The Language Manual seems to indicate not.. but something tickles me I had achieved this in the past.
解决方案Create Table as select (CTAS) is possible in Hive.
You can try out below command:
CREATE TABLE new_test
row format delimited
fields terminated by '|'
STORED AS RCFile
AS select * from source where col=1
Target cannot be partitioned table.
Target cannot be external table.
It copies the structure as well as the data
Create table like is also possible in Hive.
It just copies the source table definition.
本文介绍如何在Hive中使用Create Table as Select (CTAS)语法创建新表,并设置row format delimited字段终止符为'|'。同时讨论了目标表的一些限制条件,如不能为分区表或外部表。此外,还提到了另一种方法——通过Createtablelike来复制源表定义。
2049

被折叠的 条评论
为什么被折叠?



