在许多with语句后在Hue中创建表

时间:2019-02-12 17:39:03

标签: hadoop hive hue

我做了一些临时工作后,在顺化创建表时遇到了问题。表命令。下面是一个非常高级的示例。.我试图在创建许多临时表之后创建一个表。

我基本上是在尝试创建最后一个选择语句的表,但是我在创建表行以及确定最后一个选择*表被调用时都遇到了错误。

With TABLEA as (Select * from TEST1.FILEA),

TableB as (Select * from tableA)

Select * from tableB
where TableB.Curr = 'TYPEE'

CREATE TABLE TEST 
row format delimited 
fields terminated by '|' 
STORED AS RCFile 
as Select * from TableB

1 个答案:

答案 0 :(得分:0)

在查询中,请遵循以下语法和示例

+

示例:

create table as <your_with_clause_select_query>

您还可以在CTAS中使用嵌套的select语句。

create table test as
with tableA as ( select * from test1.fileA)
select * from tableA;