我有一个 Table_1
具有以下结构:
ID ABR CTG DATERNG VAL1 VAL2 VAL3 IND
001 BVF NJ 06/01/2019-07/30/2019 9.4 7.8 8.9 Y
002 BHT JP 05/01/2018-05/08/2019 89.5 55.4 67.4 N
003 GHT JK 09/09/2017-03/03/2018 45.4 45.3 0.0 N
..
尝试另一个 Table_2
从 Table_1
编写了以下简单的配置单元查询:
CREATE TABLE Table_2
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
AS SELECT * FROM Table_1;
但是从下面 error
信息:
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive
Runtime Error while processing row (tag=0) {"key":{},"value":
{"_col0":001,"_col1":"BVF","_col2":"NJ","_col3":"06/01/2019-
07/30/2019","_col4":"9.4","_col5":7.8,"_col6":8.9,"_col7":"Y"}}
Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1
killedTasks:0, Vertex vertex_1558653107192_0189_1_01 [Reducer 2]
killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to
VERTEX_FAILURE. failedVertices:1 killedVertices:0
任何解决问题的帮助/建议。因为我不知道问题出在哪里。。。
1条答案
按热度按时间ffscu2ro1#
你能试一下下面的语法吗。
(或)
By using ROW FORMAT SERDE:
```CREATE TABLE Table_2
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
as SELECT * FROM Table_1;
然后运行insert语句将数据从表1加载到表2