Glue / Client / list_statements

list_statements#

Glue.Client.list_statements(**kwargs)#

Lists statements for the session.

See also: AWS API Documentation

Request Syntax

response = client.list_statements(
    SessionId='string',
    RequestOrigin='string',
    NextToken='string'
)
Parameters:
  • SessionId (string) –

    [REQUIRED]

    The Session ID of the statements.

  • RequestOrigin (string) – The origin of the request to list statements.

  • NextToken (string) – A continuation token, if this is a continuation call.

Return type:

dict

Returns:

Response Syntax

{
    'Statements': [
        {
            'Id': 123,
            'Code': 'string',
            'State': 'WAITING'|'RUNNING'|'AVAILABLE'|'CANCELLING'|'CANCELLED'|'ERROR',
            'Output': {
                'Data': {
                    'TextPlain': 'string'
                },
                'ExecutionCount': 123,
                'Status': 'WAITING'|'RUNNING'|'AVAILABLE'|'CANCELLING'|'CANCELLED'|'ERROR',
                'ErrorName': 'string',
                'ErrorValue': 'string',
                'Traceback': [
                    'string',
                ]
            },
            'Progress': 123.0,
            'StartedOn': 123,
            'CompletedOn': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Statements (list) –

      Returns the list of statements.

      • (dict) –

        The statement or request for a particular action to occur in a session.

        • Id (integer) –

          The ID of the statement.

        • Code (string) –

          The execution code of the statement.

        • State (string) –

          The state while request is actioned.

        • Output (dict) –

          The output in JSON.

          • Data (dict) –

            The code execution output.

            • TextPlain (string) –

              The code execution output in text format.

          • ExecutionCount (integer) –

            The execution count of the output.

          • Status (string) –

            The status of the code execution output.

          • ErrorName (string) –

            The name of the error in the output.

          • ErrorValue (string) –

            The error value of the output.

          • Traceback (list) –

            The traceback of the output.

            • (string) –

        • Progress (float) –

          The code execution progress.

        • StartedOn (integer) –

          The unix time and date that the job definition was started.

        • CompletedOn (integer) –

          The unix time and date that the job definition was completed.

    • NextToken (string) –

      A continuation token, if not all statements have yet been returned.

Exceptions