Athena / Client / get_named_query

get_named_query#

Athena.Client.get_named_query(**kwargs)#

Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.

See also: AWS API Documentation

Request Syntax

response = client.get_named_query(
    NamedQueryId='string'
)
Parameters:

NamedQueryId (string) –

[REQUIRED]

The unique ID of the query. Use ListNamedQueries to get query IDs.

Return type:

dict

Returns:

Response Syntax

{
    'NamedQuery': {
        'Name': 'string',
        'Description': 'string',
        'Database': 'string',
        'QueryString': 'string',
        'NamedQueryId': 'string',
        'WorkGroup': 'string'
    }
}

Response Structure

  • (dict) –

    • NamedQuery (dict) –

      Information about the query.

      • Name (string) –

        The query name.

      • Description (string) –

        The query description.

      • Database (string) –

        The database to which the query belongs.

      • QueryString (string) –

        The SQL statements that make up the query.

      • NamedQueryId (string) –

        The unique identifier of the query.

      • WorkGroup (string) –

        The name of the workgroup that contains the named query.

Exceptions

  • Athena.Client.exceptions.InternalServerException

  • Athena.Client.exceptions.InvalidRequestException