簡體   English   中英

由於結構中的順序不同,雅典娜中的 HIVE_PARTITION_SCHEMA_MISMATCH?

[英]HIVE_PARTITION_SCHEMA_MISMATCH in Athena due to different order in struct?

完全錯誤

HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas. 
The types are incompatible and cannot be coerced. The column 'ein_verification' in table 'dynamodb_etl_dev.widget_user_snapshots' is declared as type 
'struct<status:string,unlocktimestamp:bigint,message:string,lastverifiedtimestamp:bigint,datelastverified:bigint>', but partition 'snapshot_time=2022-08-03T18%3A41' declared column 'ein_verification' as type 
'struct<status:string,unlocktimestamp:bigint,lastverifiedtimestamp:bigint,message:string,datelastverified:bigint>'.

看起來唯一的區別是順序message:string,lastverifiedtimestamp:bigint是相反的,但它們在其他方面是相同的。

我知道有用於更新表定義和使用表中的元數據更新現有分區的設置,但我想了解為什么會發生這種情況並可能完全阻止它發生。

此外,Athena 似乎沒有嘗試查詢最新的分區,因為在這個 s3 存儲桶中有一個具有更新時間戳的新分區。 我被困在如何繼續,因為我可以運行這個工作一次並獲得一個分區並且它工作正常。 但是到目前為止,每次我第二次運行它時,我都會收到 struct out of order 的錯誤。

這里找到了分區錯誤的答案。 特別是,在 terraform 中有一條關於如何操作的評論幫助我讓它運行

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM