create_dataset_export_job

Personalize.Client.create_dataset_export_job(**kwargs)

Creates a job that exports data from your dataset to an Amazon S3 bucket. To allow Amazon Personalize to export the training data, you must specify an service-linked IAM role that gives Amazon Personalize PutObject permissions for your Amazon S3 bucket. For information, see Exporting a dataset in the Amazon Personalize developer guide.

Status

A dataset export job can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

To get the status of the export job, call DescribeDatasetExportJob, and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

See also: AWS API Documentation

Request Syntax

response = client.create_dataset_export_job(
    jobName='string',
    datasetArn='string',
    ingestionMode='BULK'|'PUT'|'ALL',
    roleArn='string',
    jobOutput={
        's3DataDestination': {
            'path': 'string',
            'kmsKeyArn': 'string'
        }
    },
    tags=[
        {
            'tagKey': 'string',
            'tagValue': 'string'
        },
    ]
)
Parameters
  • jobName (string) --

    [REQUIRED]

    The name for the dataset export job.

  • datasetArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the dataset that contains the data to export.

  • ingestionMode (string) -- The data to export, based on how you imported the data. You can choose to export only BULK data that you imported using a dataset import job, only PUT data that you imported incrementally (using the console, PutEvents, PutUsers and PutItems operations), or ALL for both types. The default value is PUT .
  • roleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the IAM service role that has permissions to add data to your output Amazon S3 bucket.

  • jobOutput (dict) --

    [REQUIRED]

    The path to the Amazon S3 bucket where the job's output is stored.

    • s3DataDestination (dict) -- [REQUIRED]

      The configuration details of an Amazon S3 input or output bucket.

      • path (string) -- [REQUIRED]

        The file path of the Amazon S3 bucket.

      • kmsKeyArn (string) --

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files.

  • tags (list) --

    A list of tags to apply to the dataset export job.

    • (dict) --

      The optional metadata that you apply to resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information see Tagging Personalize resources.

      • tagKey (string) -- [REQUIRED]

        One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

      • tagValue (string) -- [REQUIRED]

        The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key).

Return type

dict

Returns

Response Syntax

{
    'datasetExportJobArn': 'string'
}

Response Structure

  • (dict) --

    • datasetExportJobArn (string) --

      The Amazon Resource Name (ARN) of the dataset export job.

Exceptions

  • Personalize.Client.exceptions.InvalidInputException
  • Personalize.Client.exceptions.ResourceNotFoundException
  • Personalize.Client.exceptions.ResourceAlreadyExistsException
  • Personalize.Client.exceptions.LimitExceededException
  • Personalize.Client.exceptions.ResourceInUseException
  • Personalize.Client.exceptions.TooManyTagsException