:doc:`CleanRoomsML <../../cleanroomsml>` / Client / create_ml_input_channel

***********************
create_ml_input_channel
***********************



.. py:method:: CleanRoomsML.Client.create_ml_input_channel(**kwargs)

  

  Provides the information to create an ML input channel. An ML input channel is the result of a query that can be used for ML modeling.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cleanroomsml-2023-09-06/CreateMLInputChannel>`_  


  **Request Syntax**
  ::

    response = client.create_ml_input_channel(
        membershipIdentifier='string',
        configuredModelAlgorithmAssociations=[
            'string',
        ],
        inputChannel={
            'dataSource': {
                'protectedQueryInputParameters': {
                    'sqlParameters': {
                        'queryString': 'string',
                        'analysisTemplateArn': 'string',
                        'parameters': {
                            'string': 'string'
                        }
                    },
                    'computeConfiguration': {
                        'worker': {
                            'type': 'CR.1X'|'CR.4X',
                            'number': 123,
                            'properties': {
                                'spark': {
                                    'string': 'string'
                                }
                            }
                        }
                    },
                    'resultFormat': 'CSV'|'PARQUET'
                }
            },
            'roleArn': 'string'
        },
        name='string',
        retentionInDays=123,
        description='string',
        kmsKeyArn='string',
        tags={
            'string': 'string'
        }
    )
    
  :type membershipIdentifier: string
  :param membershipIdentifier: **[REQUIRED]** 

    The membership ID of the member that is creating the ML input channel.

    

  
  :type configuredModelAlgorithmAssociations: list
  :param configuredModelAlgorithmAssociations: **[REQUIRED]** 

    The associated configured model algorithms that are necessary to create this ML input channel.

    

  
    - *(string) --* 

    

  :type inputChannel: dict
  :param inputChannel: **[REQUIRED]** 

    The input data that is used to create this ML input channel.

    

  
    - **dataSource** *(dict) --* **[REQUIRED]** 

      The data source that is used to create the ML input channel.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``protectedQueryInputParameters``. 

    
      - **protectedQueryInputParameters** *(dict) --* 

        Provides information necessary to perform the protected query.

        

      
        - **sqlParameters** *(dict) --* **[REQUIRED]** 

          The parameters for the SQL type Protected Query.

          

        
          - **queryString** *(string) --* 

            The query string to be submitted.

            

          
          - **analysisTemplateArn** *(string) --* 

            The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

            

          
          - **parameters** *(dict) --* 

            The protected query SQL parameters.

            

          
            - *(string) --* 

            
              - *(string) --* 

              
        
      
        
        - **computeConfiguration** *(dict) --* 

          Provides configuration information for the workers that will perform the protected query.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``worker``. 

        
          - **worker** *(dict) --* 

            The worker instances that will perform the compute work.

            

          
            - **type** *(string) --* 

              The instance type of the compute workers that are used.

              

            
            - **number** *(integer) --* 

              The number of compute workers that are used.

              

            
            - **properties** *(dict) --* 

              The configuration properties for the worker compute environment. These properties allow you to customize the compute settings for your Clean Rooms workloads.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``spark``. 

            
              - **spark** *(dict) --* 

                The Spark configuration properties for SQL workloads. This map contains key-value pairs that configure Apache Spark settings to optimize performance for your data processing jobs. You can specify up to 50 Spark properties, with each key being 1-200 characters and each value being 0-500 characters. These properties allow you to adjust compute capacity for large datasets and complex workloads.

                

              
                - *(string) --* 

                
                  - *(string) --* 

                  
            
          
            
          
        
        - **resultFormat** *(string) --* 

          The format in which the query results should be returned. If not specified, defaults to ``CSV``.

          

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

      The Amazon Resource Name (ARN) of the role used to run the query specified in the ``dataSource`` field of the input channel.

       

      Passing a role across AWS accounts is not allowed. If you pass a role that isn't in your account, you get an ``AccessDeniedException`` error.

      

    
  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the ML input channel.

    

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

    The number of days that the data in the ML input channel is retained.

    

  
  :type description: string
  :param description: 

    The description of the ML input channel.

    

  
  :type kmsKeyArn: string
  :param kmsKeyArn: 

    The Amazon Resource Name (ARN) of the KMS key that is used to access the input channel.

    

  
  :type tags: dict
  :param tags: 

    The optional metadata that you apply to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.

     

    The following basic restrictions apply to tags:

     

    
    * Maximum number of tags per resource - 50.
     
    * For each resource, each tag key must be unique, and each tag key can have only one value.
     
    * Maximum key length - 128 Unicode characters in UTF-8.
     
    * Maximum value length - 256 Unicode characters in UTF-8.
     
    * If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
     
    * Tag keys and values are case sensitive.
     
    * Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.
    

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'mlInputChannelArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **mlInputChannelArn** *(string) --* 

        The Amazon Resource Name (ARN) of the ML input channel.

        
  
  **Exceptions**
  
  *   :py:class:`CleanRoomsML.Client.exceptions.ConflictException`

  
  *   :py:class:`CleanRoomsML.Client.exceptions.ValidationException`

  
  *   :py:class:`CleanRoomsML.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CleanRoomsML.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CleanRoomsML.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CleanRoomsML.Client.exceptions.ServiceQuotaExceededException`

  