Skip to content

Get Statement Result V2

redshiftdataapiservice_get_statement_result_v2 R Documentation

Fetches the temporarily cached result of an SQL statement in CSV format

Description

Fetches the temporarily cached result of an SQL statement in CSV format. The execute_statement or batch_execute_statement 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.

Usage

redshiftdataapiservice_get_statement_result_v2(Id, NextToken)

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:2⁠ has a suffix of ⁠:2⁠ that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and list_statements.

NextToken

A 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.

Value

A list with the following syntax:

list(
  ColumnMetadata = list(
    list(
      columnDefault = "string",
      isCaseSensitive = TRUE|FALSE,
      isCurrency = TRUE|FALSE,
      isSigned = TRUE|FALSE,
      label = "string",
      length = 123,
      name = "string",
      nullable = 123,
      precision = 123,
      scale = 123,
      schemaName = "string",
      tableName = "string",
      typeName = "string"
    )
  ),
  NextToken = "string",
  Records = list(
    list(
      CSVRecords = "string"
    )
  ),
  ResultFormat = "JSON"|"CSV",
  TotalNumRows = 123
)

Request syntax

svc$get_statement_result_v2(
  Id = "string",
  NextToken = "string"
)