配置单元查询抛出错误输入字符串:“\uu配置单元\u d”不是整数

pgccezyw  于 2021-05-27  发布在  Hadoop
关注(0)|答案(1)|浏览(240)

我有一个Hive表,正在使用aws胶水metastore。数据驻留在s3上,我们按年、月和唯一数字进行分区。
我使用aws emr spark sql来运行查询
下面是一个示例表结构:

String                  Date          Int       Int        String
s3_url                  rec_dt        yr_number mth_number uniq_id
s3://path/example.txt   2020-03-16    2020      3          4195

现在,每当我查询这个表时,如果在下面运行命令,它就会正常运行:

select s3_url from table where (rec_dt in ('2020-03-16'))

但是,当我添加以下参数时,它会抛出错误:

select s3_url from table where (rec_dt in ('2020-03-16')) and yr_number=2020;

错误

Error in query: org.apache.hadoop.hive.metastore.api.InvalidObjectException: 

For input string: "__HIVE_D" is not an integer. 

(Service: AWSGlue; Status Code: 400; Error Code: InvalidInputException; 

Request ID: 586ff8e1-8f67-4593-940d-9f992a073be3);

我也检查了表模式,列是一个int,我也传递了一个int值。

to94eoyn

to94eoyn1#

似乎这是Hive目录和胶水目录结构不匹配的明确迹象。你说你看过Hive目录和专栏
检查aws glue目录中是否有指定数据类型的此列。
检查架构详细信息的ui示例。。。

我希望您使用aws glue数据目录作为配置单元元存储

相关问题