Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3¶
Description¶
Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3. For more information, see Working with query results, recent queries, and output files in the Amazon Athena User Guide. This request does not execute the query but returns results. Use start_query_execution to run a query.
To stream query results successfully, the IAM principal with permission to call get_query_results also must have permissions to the Amazon S3 GetObject action for the Athena query results location.
IAM principals with permission to the Amazon S3 GetObject action for the query results location are able to retrieve query results from Amazon S3 even if permission to the get_query_results action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.
Usage¶
Arguments¶
-
QueryExecutionId[required] The unique ID of the query execution.
-
NextTokenA token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextTokenfrom the response object of the previous page call. -
MaxResultsThe maximum number of results (rows) to return in this request.
-
QueryResultTypeWhen you set this to
DATA_ROWSor empty,get_query_resultsreturns the query results in rows. If set toDATA_MANIFEST, it returns the manifest file in rows. Only the query typesCREATE TABLE AS SELECT,UNLOAD, andINSERTcan generate a manifest file. If you useDATA_MANIFESTfor other query types, the query will fail.
Value¶
A list with the following syntax:
list(
UpdateCount = 123,
ResultSet = list(
Rows = list(
list(
Data = list(
list(
VarCharValue = "string"
)
)
)
),
ResultSetMetadata = list(
ColumnInfo = list(
list(
CatalogName = "string",
SchemaName = "string",
TableName = "string",
Name = "string",
Label = "string",
Type = "string",
Precision = 123,
Scale = 123,
Nullable = "NOT_NULL"|"NULLABLE"|"UNKNOWN",
CaseSensitive = TRUE|FALSE
)
)
)
),
NextToken = "string"
)