Athena.Client.
batch_get_named_query
(**kwargs)¶Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_named_query(
NamedQueryIds=[
'string',
]
)
[REQUIRED]
An array of query IDs.
{
'NamedQueries': [
{
'Name': 'string',
'Description': 'string',
'Database': 'string',
'QueryString': 'string',
'NamedQueryId': 'string',
'WorkGroup': 'string'
},
],
'UnprocessedNamedQueryIds': [
{
'NamedQueryId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the named query IDs submitted.
A query, where QueryString
contains the SQL statements that make up the query.
The query name.
The query description.
The database to which the query belongs.
The SQL statements that make up the query.
The unique identifier of the query.
The name of the workgroup that contains the named query.
Information about provided query IDs.
Information about a named query ID that could not be processed.
The unique identifier of the named query.
The error code returned when the processing request for the named query failed, if applicable.
The error message returned when the processing request for the named query failed, if applicable.
Exceptions
Athena.Client.exceptions.InternalServerException
Athena.Client.exceptions.InvalidRequestException