Skip to main content

query_states

Creates, updates, deletes, gets or lists a query_states resource.

Overview

Namequery_states
TypeResource
Idaws.lakeformation.query_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
errorstringAn error message when the operation fails.
statestringThe 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. (PENDING, WORKUNITS_AVAILABLE, ERROR, FINISHED, EXPIRED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_query_stateselectregionReturns 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
error,
state
FROM aws.lakeformation.query_states
WHERE region = '{{ region }}' -- required
;