create table temp2 select * from temp1 没有获取配置单元 0.14 中源 table 的所有属性
create table temp2 select * from temp1 is not taking all the properties of the source table in hive 0.14
我正在尝试使用以下过程从另一个 table(temp1) 创建 table (temp2),table 正在创建,但 temp2 table 如下例所示。
table temp2 中缺少的属性是
field.delim '\t' ---缺少这个
serialization.format '\t' ---缺少这个
create table temp1 (
id int,
name string,
age int,
address string
) row format delimited fields terminated by '\t';
describe formatted temp1;
id int,
name string,
age int,
address string
<additional messages>
-----
----
field.delim '\t'
serialization.format '\t'
create table temp2 select * from temp1 where 1=2;
descibe formatted temp2;
id int,
name string,
age int,
address string
<additional messages>
-----
----
field.delim '\t' --- This is missing
serialization.format '\t' --- This is missing
"Create table" 只是使用来自 "select" 的数据来构建他的属性。我想当配置单元将数据从 table 推送到另一个时,没有与数据关联的格式。
您可以使用类似下面的代码:
CREATE TABLE IF NOT EXISTS temp2 LIKE temp1;
FROM temp1 INSERT INTO temp2 SELECT * FROM temp1 WHERE 1=2;
我正在尝试使用以下过程从另一个 table(temp1) 创建 table (temp2),table 正在创建,但 temp2 table 如下例所示。
table temp2 中缺少的属性是
field.delim '\t' ---缺少这个 serialization.format '\t' ---缺少这个
create table temp1 (
id int,
name string,
age int,
address string
) row format delimited fields terminated by '\t';
describe formatted temp1;
id int,
name string,
age int,
address string
<additional messages>
-----
----
field.delim '\t'
serialization.format '\t'
create table temp2 select * from temp1 where 1=2;
descibe formatted temp2;
id int,
name string,
age int,
address string
<additional messages>
-----
----
field.delim '\t' --- This is missing
serialization.format '\t' --- This is missing
"Create table" 只是使用来自 "select" 的数据来构建他的属性。我想当配置单元将数据从 table 推送到另一个时,没有与数据关联的格式。
您可以使用类似下面的代码:
CREATE TABLE IF NOT EXISTS temp2 LIKE temp1;
FROM temp1 INSERT INTO temp2 SELECT * FROM temp1 WHERE 1=2;