2 Answers
- Newest
- Most votes
- Most comments
0
After much trail and error, I came to find out the true source of the issue was due to a difference in permissions between my console account and CLI account. Adding the select/describe permissions to my CLI account immediately resolved the error. The error message regarding the column not being resolved was misleading in this situation. Further interesting was this did not generate any sort of Unauthorized event in our CloudTrail.
answered a year ago
0
Please review the column names in the respective tables. It looks like the ON condition is not same at both places. Python code is referring t2.id
while console query refers t1.id
and same anomaly for the module_id
column.
Python Code:
t1 LEFT JOIN t2
ON t2.id = t1.module_id
Athena Console Query:
t1 LEFT JOIN t2
ON t1.id = t2.module_id```
answered a year ago
Relevant content
- asked 15 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 4 months ago
Ah yes, that was a bad copy/paste. In the source code prior to me anonymizing it, they're both identical yet the same issues persists. The both are in fact
t2.id = t1.module_id
Also for further clarification, when the query fails via Python, I go the console, click the failed query to load it and hit run without edits and it succeeds. I'm not actually copying/pasting anything between the two systems.