:doc:`Glue <../../glue>` / Client / get_statement

*************
get_statement
*************



.. py:method:: Glue.Client.get_statement(**kwargs)

  

  Retrieves the statement.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetStatement>`_  


  **Request Syntax**
  ::

    response = client.get_statement(
        SessionId='string',
        Id=123,
        RequestOrigin='string'
    )
    
  :type SessionId: string
  :param SessionId: **[REQUIRED]** 

    The Session ID of the statement.

    

  
  :type Id: integer
  :param Id: **[REQUIRED]** 

    The Id of the statement.

    

  
  :type RequestOrigin: string
  :param RequestOrigin: 

    The origin of the request.

    

  
  
  :rtype: 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**
  
  *   :py:class:`Glue.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.IllegalSessionStateException`

  