And*_*wSC 5 amazon-athena aws-glue
从 Athena 查询 Parquet 数据时出现架构不匹配错误。
错误是:
HIVE_CANNOT_OPEN_SPLIT: Error opening Hive split s3://datalake/googleanalytics/version=0/eventDate=2017-06-11/part-00001-9c9312f7-f9a5-47c3-987e-9348b78aaebc-c000.snappy.parquet (offset=0, length=48653579): Schema mismatch, metastore schema for row column totals has 13 fields but parquet schema has 12 fields
Run Code Online (Sandbox Code Playgroud)
在 AWS Glue Crawler 中,我尝试使用表中的元数据启用更新所有新的和现有的分区,我认为这可以解决此问题,但是我仍然遇到上述错误。我这样做是因为类似的问题: 如何创建分区具有不同列的 AWS Glue 表?('HIVE_PARTITION_SCHEMA_MISMATCH')
总计列的表架构是:
struct<visits:bigint,hits:bigint,pageviews:bigint,timeOnSite:bigint,bounces:bigint,transactions:bigint,transactionRevenue:bigint,newVisits:bigint,screenviews:bigint,uniqueScreenviews:bigint,timeOnScreen:bigint,totalTransactionRevenue:bigint,sessionQualityDim:bigint>
Run Code Online (Sandbox Code Playgroud)
分区eventDate=2017-06-11的镶木地板文件缺少最后一个字段"sessionQualityDim"。
您有具有两种不同架构的镶木地板文件,并且 Athena 表架构与较新的架构匹配。您可以执行以下操作之一:
1) 在 athena 中创建两个不同的表,一个指向 2017 年之前的数据,另一个指向 2017 年之后的数据。
2) 如果较旧的数据对于当前用例不再有效,那么您可以简单地归档该数据并从当前表中删除 2017 年及较早的分区。
| 归档时间: |
|
| 查看次数: |
4181 次 |
| 最近记录: |