1 Answer
- Newest
- Most votes
- Most comments
0
Athena by default reports a stale view under one of or more of the following conditions:
- The table or database that's specified in the view query doesn't exist.
- You tried to modify the table definition after you create the view.
- You tried to update the schema or metadata in a referenced table while recreating or updating the table.
For example, your query fails with this error if you create a view and then run an ALTER TABLE ADD COLUMNS statement on the same table.
To prevent "stale view" errors, recreate the view whenever you modify the underlying table or databases. You can also replace the view by adding the OR REPLACE clause in the CREATE VIEW statement. This clause lets you update the existing view by replacing it.
answered a year ago
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago