Skip to content

Commit 1434dba

Browse files
author
AWS
committed
Amazon Athena Update: This feature allows customers to retrieve runtime statistics for completed queries
1 parent 2072283 commit 1434dba

File tree

3 files changed

+180
-0
lines changed

3 files changed

+180
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Athena",
4+
"contributor": "",
5+
"description": "This feature allows customers to retrieve runtime statistics for completed queries"
6+
}

services/athena/src/main/resources/codegen-resources/paginators-1.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"output_token": "NextToken",
1818
"result_key": "DatabaseList"
1919
},
20+
"ListEngineVersions": {
21+
"input_token": "NextToken",
22+
"limit_key": "MaxResults",
23+
"output_token": "NextToken"
24+
},
2025
"ListNamedQueries": {
2126
"input_token": "NextToken",
2227
"limit_key": "MaxResults",

services/athena/src/main/resources/codegen-resources/service-2.json

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,20 @@
256256
],
257257
"documentation":"<p>Streams the results of a single query execution specified by <code>QueryExecutionId</code> from the Athena query results location in Amazon S3. For more information, see <a href=\"https://docs.aws.amazon.com/athena/latest/ug/querying.html\">Query Results</a> in the <i>Amazon Athena User Guide</i>. This request does not execute the query but returns results. Use <a>StartQueryExecution</a> to run a query.</p> <p>To stream query results successfully, the IAM principal with permission to call <code>GetQueryResults</code> also must have permissions to the Amazon S3 <code>GetObject</code> action for the Athena query results location.</p> <important> <p>IAM principals with permission to the Amazon S3 <code>GetObject</code> action for the query results location are able to retrieve query results from Amazon S3 even if permission to the <code>GetQueryResults</code> action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.</p> </important>"
258258
},
259+
"GetQueryRuntimeStatistics":{
260+
"name":"GetQueryRuntimeStatistics",
261+
"http":{
262+
"method":"POST",
263+
"requestUri":"/"
264+
},
265+
"input":{"shape":"GetQueryRuntimeStatisticsInput"},
266+
"output":{"shape":"GetQueryRuntimeStatisticsOutput"},
267+
"errors":[
268+
{"shape":"InternalServerException"},
269+
{"shape":"InvalidRequestException"}
270+
],
271+
"documentation":"<p>Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran. The query execution runtime statistics is returned only when <a>QueryExecutionStatus$State</a> is in a SUCCEEDED or FAILED state.</p>"
272+
},
259273
"GetTableMetadata":{
260274
"name":"GetTableMetadata",
261275
"http":{
@@ -1285,6 +1299,25 @@
12851299
}
12861300
}
12871301
},
1302+
"GetQueryRuntimeStatisticsInput":{
1303+
"type":"structure",
1304+
"required":["QueryExecutionId"],
1305+
"members":{
1306+
"QueryExecutionId":{
1307+
"shape":"QueryExecutionId",
1308+
"documentation":"<p>The unique ID of the query execution.</p>"
1309+
}
1310+
}
1311+
},
1312+
"GetQueryRuntimeStatisticsOutput":{
1313+
"type":"structure",
1314+
"members":{
1315+
"QueryRuntimeStatistics":{
1316+
"shape":"QueryRuntimeStatistics",
1317+
"documentation":"<p>Runtime statistics about the query execution.</p>"
1318+
}
1319+
}
1320+
},
12881321
"GetTableMetadataInput":{
12891322
"type":"structure",
12901323
"required":[
@@ -1976,6 +2009,138 @@
19762009
},
19772010
"documentation":"<p>The completion date, current state, submission time, and state change reason (if applicable) for the query execution.</p>"
19782011
},
2012+
"QueryRuntimeStatistics":{
2013+
"type":"structure",
2014+
"members":{
2015+
"Timeline":{"shape":"QueryRuntimeStatisticsTimeline"},
2016+
"Rows":{"shape":"QueryRuntimeStatisticsRows"},
2017+
"OutputStage":{
2018+
"shape":"QueryStage",
2019+
"documentation":"<p>Stage statistics such as input and output rows and bytes, execution time, and stage state. This information also includes substages and the query stage plan.</p>"
2020+
}
2021+
},
2022+
"documentation":"<p>The query execution timeline, statistics on input and output rows and bytes, and the different query stages that form the query execution plan.</p>"
2023+
},
2024+
"QueryRuntimeStatisticsRows":{
2025+
"type":"structure",
2026+
"members":{
2027+
"InputRows":{
2028+
"shape":"Long",
2029+
"documentation":"<p>The number of rows read to execute the query.</p>"
2030+
},
2031+
"InputBytes":{
2032+
"shape":"Long",
2033+
"documentation":"<p>The number of bytes read to execute the query.</p>"
2034+
},
2035+
"OutputBytes":{
2036+
"shape":"Long",
2037+
"documentation":"<p>The number of bytes returned by the query.</p>"
2038+
},
2039+
"OutputRows":{
2040+
"shape":"Long",
2041+
"documentation":"<p>The number of rows returned by the query.</p>"
2042+
}
2043+
},
2044+
"documentation":"<p>Statistics such as input rows and bytes read by the query, rows and bytes output by the query, and the number of rows written by the query.</p>"
2045+
},
2046+
"QueryRuntimeStatisticsTimeline":{
2047+
"type":"structure",
2048+
"members":{
2049+
"QueryQueueTimeInMillis":{
2050+
"shape":"Long",
2051+
"documentation":"<p>The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.</p>"
2052+
},
2053+
"QueryPlanningTimeInMillis":{
2054+
"shape":"Long",
2055+
"documentation":"<p>The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.</p>"
2056+
},
2057+
"EngineExecutionTimeInMillis":{
2058+
"shape":"Long",
2059+
"documentation":"<p>The number of milliseconds that the query took to execute.</p>"
2060+
},
2061+
"ServiceProcessingTimeInMillis":{
2062+
"shape":"Long",
2063+
"documentation":"<p>The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.</p>"
2064+
},
2065+
"TotalExecutionTimeInMillis":{
2066+
"shape":"Long",
2067+
"documentation":"<p>The number of milliseconds that Athena took to run the query.</p>"
2068+
}
2069+
},
2070+
"documentation":"<p>Timeline statistics such as query queue time, planning time, execution time, service processing time, and total execution time.</p>"
2071+
},
2072+
"QueryStage":{
2073+
"type":"structure",
2074+
"members":{
2075+
"StageId":{
2076+
"shape":"Long",
2077+
"documentation":"<p>The identifier for a stage.</p>"
2078+
},
2079+
"State":{
2080+
"shape":"String",
2081+
"documentation":"<p>State of the stage after query execution.</p>"
2082+
},
2083+
"OutputBytes":{
2084+
"shape":"Long",
2085+
"documentation":"<p>The number of bytes output from the stage after execution.</p>"
2086+
},
2087+
"OutputRows":{
2088+
"shape":"Long",
2089+
"documentation":"<p>The number of rows output from the stage after execution.</p>"
2090+
},
2091+
"InputBytes":{
2092+
"shape":"Long",
2093+
"documentation":"<p>The number of bytes input into the stage for execution.</p>"
2094+
},
2095+
"InputRows":{
2096+
"shape":"Long",
2097+
"documentation":"<p>The number of rows input into the stage for execution.</p>"
2098+
},
2099+
"ExecutionTime":{
2100+
"shape":"Long",
2101+
"documentation":"<p>Time taken to execute this stage.</p>"
2102+
},
2103+
"QueryStagePlan":{
2104+
"shape":"QueryStagePlanNode",
2105+
"documentation":"<p>Stage plan information such as name, identifier, sub plans, and source stages.</p>"
2106+
},
2107+
"SubStages":{
2108+
"shape":"QueryStages",
2109+
"documentation":"<p>List of sub query stages that form this stage execution plan.</p>"
2110+
}
2111+
},
2112+
"documentation":"<p>Stage statistics such as input and output rows and bytes, execution time and stage state. This information also includes substages and the query stage plan.</p>"
2113+
},
2114+
"QueryStagePlanNode":{
2115+
"type":"structure",
2116+
"members":{
2117+
"Name":{
2118+
"shape":"String",
2119+
"documentation":"<p>Name of the query stage plan that describes the operation this stage is performing as part of query execution.</p>"
2120+
},
2121+
"Identifier":{
2122+
"shape":"String",
2123+
"documentation":"<p>Information about the operation this query stage plan node is performing.</p>"
2124+
},
2125+
"Children":{
2126+
"shape":"QueryStagePlanNodes",
2127+
"documentation":"<p>Stage plan information such as name, identifier, sub plans, and remote sources of child plan nodes/</p>"
2128+
},
2129+
"RemoteSources":{
2130+
"shape":"StringList",
2131+
"documentation":"<p>Source plan node IDs.</p>"
2132+
}
2133+
},
2134+
"documentation":"<p>Stage plan information such as name, identifier, sub plans, and remote sources.</p>"
2135+
},
2136+
"QueryStagePlanNodes":{
2137+
"type":"list",
2138+
"member":{"shape":"QueryStagePlanNode"}
2139+
},
2140+
"QueryStages":{
2141+
"type":"list",
2142+
"member":{"shape":"QueryStage"}
2143+
},
19792144
"QueryString":{
19802145
"type":"string",
19812146
"max":262144,
@@ -2167,6 +2332,10 @@
21672332
}
21682333
},
21692334
"String":{"type":"string"},
2335+
"StringList":{
2336+
"type":"list",
2337+
"member":{"shape":"String"}
2338+
},
21702339
"TableMetadata":{
21712340
"type":"structure",
21722341
"required":["Name"],

0 commit comments

Comments
 (0)