Glue / Client / get_statement

get_statement#

Glue.Client.get_statement(**kwargs)#

Retrieves the statement.

See also: AWS API Documentation

Request Syntax

response = client.get_statement(
    SessionId='string',
    Id=123,
    RequestOrigin='string'
)
Parameters:
  • SessionId (string) –

    [REQUIRED]

    The Session ID of the statement.

  • Id (integer) –

    [REQUIRED]

    The Id of the statement.

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

Return type:

dict

Returns:

Response Syntax

{
    'Statement': {
        '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
    }
}

Response Structure

  • (dict) –

    • Statement (dict) –

      Returns the statement.

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

Exceptions