hive sql 常见异常

1、union

Logging initialized using configuration in file:/home/xiaoju/hadoop/apache-hive-1.2.1-bin/conf/hive-log4j.properties
Added [target/publiclog-serde-1.0-SNAPSHOT-jar-with-dependencies.jar] to class path
Added resources: [target/publiclog-serde-1.0-SNAPSHOT-jar-with-dependencies.jar]
FAILED: SemanticException Schema of both sides of union should match.

原因:联合两边的表必须具有相同的字段。

[En]

Reason: tables on both sides of the union must have the same fields.

2、insert into

17/02/22 20:15:54 WARN conf.HiveConf: HiveConf of name hive.client.unlimit.users does not exist
17/02/22 20:15:54 WARN conf.HiveConf: HiveConf of name hive.hadoop.master does not exist

Logging initialized using configuration in file:/home/xiaoju/hadoop/apache-hive-1.2.1-bin/conf/hive-log4j.properties
Added [target/publiclog-serde-1.0-SNAPSHOT-jar-with-dependencies.jar] to class path
Added resources: [target/publiclog-serde-1.0-SNAPSHOT-jar-with-dependencies.jar]
OK
Time taken: 0.859 seconds
OK
Time taken: 0.291 seconds
FAILED: SemanticException [Error 10044]: Line 3:18 Cannot insert into target table because column number/types are different ”20”: Table insclause-0 has 1 columns, but query has 2 columns.

原因:INSERT INTO后跟的结果集的字段类型和编号与表的不一致。

[En]

Reason: the field type and number of the result set followed by insert into are not consistent with those of the table.

Original: https://www.cnblogs.com/likehua/p/6430669.html
Author: 李克华
Title: hive sql 常见异常

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/6793/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部