【发布时间】:2020-06-28 22:39:00
【问题描述】:
我有一个使用 AWS Glue 元存储的 Hive 表。数据驻留在 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 值。
【问题讨论】:
标签: amazon-web-services apache-spark hadoop hive aws-glue