How can I find the Query ID for an Athena Saved Query on AWS console?

0

After I create a query in Athena using the AWS console, how can I find the Query ID associated with that query?

If I run the query and it fails, I can see the Query ID in the AWS console by going to "Recent Queries" and clicking the "Failed" link next to the query run (https://docs.aws.amazon.com/athena/latest/ug/querying.html), but this doesn't work for queries where the status is "completed".

I can also use the API to first call ListNamedQueries, then iterate through that resulting list of query ids and call GetNamedQuery on each one to see if the name matches the query I'm looking for. But that's a really roundabout process just to get the query id for a query I just created.

Is there another way to simply find a named query's id via the console that I'm not seeing?

已提問 2 年前檢視次數 1900 次
2 個答案
0

No, I'm not looking for the Execution Id. That would be the id for a query run. I'm looking for a way to find the NamedQueryId for a Named Query from console.

已回答 2 年前
0

Hi ,

based on the documentation link you shared I think that the id you are looking for is the **Execution Id** . If want to check click on the failed query and look at the Query Id you will see it should match the execution id.

hope this helps,

AWS
專家
已回答 2 年前

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

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

回答問題指南