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

*************
create_script
*************



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

  

  Transforms a directed acyclic graph (DAG) into code.

  

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


  **Request Syntax**
  ::

    response = client.create_script(
        DagNodes=[
            {
                'Id': 'string',
                'NodeType': 'string',
                'Args': [
                    {
                        'Name': 'string',
                        'Value': 'string',
                        'Param': True|False
                    },
                ],
                'LineNumber': 123
            },
        ],
        DagEdges=[
            {
                'Source': 'string',
                'Target': 'string',
                'TargetParameter': 'string'
            },
        ],
        Language='PYTHON'|'SCALA'
    )
    
  :type DagNodes: list
  :param DagNodes: 

    A list of the nodes in the DAG.

    

  
    - *(dict) --* 

      Represents a node in a directed acyclic graph (DAG)

      

    
      - **Id** *(string) --* **[REQUIRED]** 

        A node identifier that is unique within the node's graph.

        

      
      - **NodeType** *(string) --* **[REQUIRED]** 

        The type of node that this is.

        

      
      - **Args** *(list) --* **[REQUIRED]** 

        Properties of the node, in the form of name-value pairs.

        

      
        - *(dict) --* 

          An argument or property of a node.

          

        
          - **Name** *(string) --* **[REQUIRED]** 

            The name of the argument or property.

            

          
          - **Value** *(string) --* **[REQUIRED]** 

            The value of the argument or property.

            

          
          - **Param** *(boolean) --* 

            True if the value is used as a parameter.

            

          
        
    
      - **LineNumber** *(integer) --* 

        The line number of the node.

        

      
    

  :type DagEdges: list
  :param DagEdges: 

    A list of the edges in the DAG.

    

  
    - *(dict) --* 

      Represents a directional edge in a directed acyclic graph (DAG).

      

    
      - **Source** *(string) --* **[REQUIRED]** 

        The ID of the node at which the edge starts.

        

      
      - **Target** *(string) --* **[REQUIRED]** 

        The ID of the node at which the edge ends.

        

      
      - **TargetParameter** *(string) --* 

        The target of the edge.

        

      
    

  :type Language: string
  :param Language: 

    The programming language of the resulting code from the DAG.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'PythonScript': 'string',
          'ScalaCode': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PythonScript** *(string) --* 

        The Python script generated from the DAG.

        
      

      - **ScalaCode** *(string) --* 

        The Scala code generated from the DAG.

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

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

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

  