query_states
Creates, updates, deletes, gets or lists a query_states resource.
Overview
| Name | query_states |
| Type | Resource |
| Id | aws.lakeformation.query_states |
Fields
The following fields are returned by SELECT queries:
- get_query_state
| Name | Datatype | Description |
|---|---|---|
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. (PENDING, WORKUNITS_AVAILABLE, ERROR, FINISHED, EXPIRED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_query_state | select | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_query_state
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
;