statement_result_v2s
Creates, updates, deletes, gets or lists a statement_result_v2s resource.
Overview
| Name | statement_result_v2s |
| Type | Resource |
| Id | aws.redshift_data.statement_result_v2s |
Fields
The following fields are returned by SELECT queries:
- get_statement_result_v2
| Name | Datatype | Description |
|---|---|---|
csv_records | string | The results of the SQL statement in CSV format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_statement_result_v2 | select | region | Fetches the temporarily cached result of an SQL statement in CSV format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as CSV. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide. |
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_statement_result_v2
Fetches the temporarily cached result of an SQL statement in CSV format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as CSV. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
SELECT
csv_records
FROM aws.redshift_data.statement_result_v2s
WHERE region = '{{ region }}' -- required
;