:doc:`CustomerProfiles <../../customer-profiles>` / Client / create_upload_job

*****************
create_upload_job
*****************



.. py:method:: CustomerProfiles.Client.create_upload_job(**kwargs)

  

  Creates an Upload job to ingest data for segment imports. The metadata is created for the job with the provided field mapping and unique key.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/customer-profiles-2020-08-15/CreateUploadJob>`_  


  **Request Syntax**
  ::

    response = client.create_upload_job(
        DomainName='string',
        DisplayName='string',
        Fields={
            'string': {
                'Source': 'string',
                'Target': 'string',
                'ContentType': 'STRING'|'NUMBER'|'PHONE_NUMBER'|'EMAIL_ADDRESS'|'NAME'
            }
        },
        UniqueKey='string',
        DataExpiry=123
    )
    
  :type DomainName: string
  :param DomainName: **[REQUIRED]** 

    The unique name of the domain. Domain should be exists for the upload job to be created.

    

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

    The unique name of the upload job. Could be a file name to identify the upload job.

    

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

    The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        Represents a field in a ProfileObjectType.

        

      
        - **Source** *(string) --* 

          A field of a ProfileObject. For example: _source.FirstName, where “_source” is a ProfileObjectType of a Zendesk user and “FirstName” is a field in that ObjectType.

          

        
        - **Target** *(string) --* 

          The location of the data in the standard ProfileObject model. For example: _profile.Address.PostalCode.

          

        
        - **ContentType** *(string) --* 

          The content type of the field. Used for determining equality when searching.

          

        
      


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

    The unique key columns for de-duping the profiles used to map data to the profile.

    

  
  :type DataExpiry: integer
  :param DataExpiry: 

    The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **JobId** *(string) --* 

        The unique identifier for the created upload job.

        
  
  **Exceptions**
  
  *   :py:class:`CustomerProfiles.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CustomerProfiles.Client.exceptions.InternalServerException`

  
  *   :py:class:`CustomerProfiles.Client.exceptions.BadRequestException`

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

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

  