Athena query fails with GENERIC_INTERNAL_ERROR: Missing variable: <column_name>

0

Hi
After creating quite complex view based on "UNION ALL" of 4 complex selects I've ended up with a curious situation:

  1. The view itself is queried OK with simple queries like select * from <view_name> where <conditions>
  2. Once I wrap it into bigger select like select count(*) from (select * from <view_name> where <conditions>) I get the following strange error:
    GENERIC_INTERNAL_ERROR: Missing variable: <column_name> where <column_name> is absolutely live and valid column that could be queried and returned as usual

The issue is repeatable - once I recreate the same set of views on another Database and same data - issue repeats

However it's barely searched on the web - looks like nobody faced such errors

已提問 2 年前檢視次數 636 次
1 個回答
0
已接受的答案

Update on the topic: I had the hypothesis that the resulting query is too long (after unwrapping all the selects from underlying views)
So I changed the <view_name> to Create Table As Select and looks like it fixed my problem, however I'm not sure that exactly this helped

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南