RedshiftDataAPIService / Paginator / GetStatementResult

GetStatementResult#

class RedshiftDataAPIService.Paginator.GetStatementResult#
paginator = client.get_paginator('get_statement_result')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from RedshiftDataAPIService.Client.get_statement_result().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Id='string',
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • Id (string) –

    [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 ListStatements.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'ColumnMetadata': [
        {
            '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'
        },
    ],
    'Records': [
        [
            {
                'blobValue': b'bytes',
                'booleanValue': True|False,
                'doubleValue': 123.0,
                'isNull': True|False,
                'longValue': 123,
                'stringValue': 'string'
            },
        ],
    ],
    'TotalNumRows': 123
}

Response Structure

  • (dict) –

    • ColumnMetadata (list) –

      The properties (metadata) of a column.

      • (dict) –

        The properties (metadata) of a column.

        • columnDefault (string) –

          The default value of the column.

        • isCaseSensitive (boolean) –

          A value that indicates whether the column is case-sensitive.

        • isCurrency (boolean) –

          A value that indicates whether the column contains currency values.

        • isSigned (boolean) –

          A value that indicates whether an integer column is signed.

        • label (string) –

          The label for the column.

        • length (integer) –

          The length of the column.

        • name (string) –

          The name of the column.

        • nullable (integer) –

          A value that indicates whether the column is nullable.

        • precision (integer) –

          The precision value of a decimal number column.

        • scale (integer) –

          The scale value of a decimal number column.

        • schemaName (string) –

          The name of the schema that contains the table that includes the column.

        • tableName (string) –

          The name of the table that includes the column.

        • typeName (string) –

          The database-specific data type of the column.

    • Records (list) –

      The results of the SQL statement.

      • (list) –

        • (dict) –

          A data value in a column.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: blobValue, booleanValue, doubleValue, isNull, longValue, stringValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • blobValue (bytes) –

            A value of the BLOB data type.

          • booleanValue (boolean) –

            A value of the Boolean data type.

          • doubleValue (float) –

            A value of the double data type.

          • isNull (boolean) –

            A value that indicates whether the data is NULL.

          • longValue (integer) –

            A value of the long data type.

          • stringValue (string) –

            A value of the string data type.

    • TotalNumRows (integer) –

      The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results.