LakeFormation / Client / get_query_state

get_query_state#

LakeFormation.Client.get_query_state(**kwargs)#

Returns the state of a query previously submitted. Clients are expected to poll GetQueryState to monitor the current state of the planning before retrieving the work units. A query state is only visible to the principal that made the initial call to StartQueryPlanning.

See also: AWS API Documentation

Request Syntax

response = client.get_query_state(
    QueryId='string'
)
Parameters:

QueryId (string) –

[REQUIRED]

The ID of the plan query operation.

Return type:

dict

Returns:

Response Syntax

{
    'Error': 'string',
    'State': 'PENDING'|'WORKUNITS_AVAILABLE'|'ERROR'|'FINISHED'|'EXPIRED'
}

Response Structure

  • (dict) –

    A structure for the output.

    • Error (string) –

      An error message when the operation fails.

    • State (string) –

      The state of a query previously submitted. The possible states are:

      • PENDING: the query is pending.

      • WORKUNITS_AVAILABLE: some work units are ready for retrieval and execution.

      • FINISHED: the query planning finished successfully, and all work units are ready for retrieval and execution.

      • ERROR: an error occurred with the query, such as an invalid query ID or a backend error.

Exceptions

  • LakeFormation.Client.exceptions.InternalServiceException

  • LakeFormation.Client.exceptions.InvalidInputException

  • LakeFormation.Client.exceptions.AccessDeniedException