- Newest
- Most votes
- Most comments
Firstly, there is a known issue in the Athena Engine version 3 related to the creation of views, particularly those involving the UNNEST operation. The error message you're seeing is consistent with this issue, and the current workaround is to use Engine version 2.
https://repost.aws/questions/QUXHNVR7hXQYe1hjyDWxpgqA/athena-engine-v-3-errors-in-view-with-unnest
Secondly, there appears to be a type of coercion issue. The error message suggests that there is a discrepancy between the type of the account_id column as projected from the query view and the type stored in the view definition. A similar issue has been reported in the context of Hive, where a view became stale because it was attempting to coerce a column of type char(n) to a column of type varchar stored in the view definition. This resulted in an error stating that the view was stale and needed to be recreated
https://github.com/trinodb/trino/issues/6234.
To address your issue, you may want to consider the following steps:
Confirm the engine version of Athena you're using. If it's version 3, consider downgrading to version 2 as a workaround. Check the data types of the account_id column in your view definition and in the query view. If they don't match, you may need to update the view definition or adjust the query to ensure the types match. If the view is stale, consider recreating the view.
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
thanks, recreating the views the error wasn't there anymore