Fetches the temporarily cached result of an SQL statement in JSON format¶
Description¶
Fetches the temporarily cached result of an SQL statement in JSON format. The execute_statement or batch_execute_statement operation that ran the SQL statement must have specified ResultFormat as JSON , or let the format default to JSON. 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.
Usage¶
Arguments¶
-
Id[required] The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example,
d9b6c0c9-0747-4bf4-b142-e8883122f766:2has a suffix of:2that indicates the second SQL statement of a batch query. This identifier is returned byBatchExecuteStatment,ExecuteStatment, andlist_statements. -
NextTokenA value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
-
WaitTimeSecondsThe number of seconds to wait for the SQL statement to complete execution before returning the result. The maximum value is 30 seconds.
Value¶
A list with the following syntax:
list(
Records = list(
list(
list(
isNull = TRUE|FALSE,
booleanValue = TRUE|FALSE,
longValue = 123,
doubleValue = 123.0,
stringValue = "string",
blobValue = raw
)
)
),
ColumnMetadata = list(
list(
isCaseSensitive = TRUE|FALSE,
isCurrency = TRUE|FALSE,
isSigned = TRUE|FALSE,
label = "string",
name = "string",
nullable = 123,
precision = 123,
scale = 123,
schemaName = "string",
tableName = "string",
typeName = "string",
length = 123,
columnDefault = "string"
)
),
TotalNumRows = 123,
NextToken = "string"
)