Skip to main content

data_deletion_jobs

Creates, updates, deletes, gets or lists a data_deletion_jobs resource.

Overview

Namedata_deletion_jobs
TypeResource
Idaws.personalize.data_deletion_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_date_timestring (date-time)The creation date and time (in Unix time) of the data deletion job.
data_deletion_job_arnstringThe Amazon Resource Name (ARN) of the data deletion job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
data_sourceobjectDescribes the data source that contains the data to upload to a dataset, or the list of records to delete from Amazon Personalize.
dataset_group_arnstringThe Amazon Resource Name (ARN) of the dataset group the job deletes records from. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
failure_reasonstringIf a data deletion job fails, provides the reason why.
job_namestringThe name of the data deletion job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)
last_updated_date_timestring (date-time)The date and time (in Unix time) the data deletion job was last updated.
num_deletedintegerThe number of records deleted by a COMPLETED job.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role that has permissions to read from the Amazon S3 data source. (pattern: <code>arn:([a-z\d-]+):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
statusstringThe status of the data deletion job. A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_data_deletion_jobselectregionDescribes the data deletion job created by CreateDataDeletionJob, including the job status.
list_data_deletion_jobsselectregionReturns a list of data deletion jobs for a dataset group ordered by creation time, with the most recent first. When a dataset group is not specified, all the data deletion jobs associated with the account are listed. The response provides the properties for each job, including the Amazon Resource Name (ARN). For more information on data deletion jobs, see Deleting users.
create_data_deletion_jobinsertregion, jobName, datasetGroupArn, dataSource, roleArnCreates a batch job that deletes all references to specific users from an Amazon Personalize dataset group in batches. You specify the users to delete in a CSV file of userIds in an Amazon S3 bucket. After a job completes, Amazon Personalize no longer trains on the users’ data and no longer considers the users when generating user segments. For more information about creating a data deletion job, see Deleting users. Your input file must be a CSV file with a single USER_ID column that lists the users IDs. For more information about preparing the CSV file, see Preparing your data deletion file and uploading it to Amazon S3. To give Amazon Personalize permission to access your input CSV file of userIds, you must specify an IAM service role that has permission to read from the data source. This role needs GetObject and ListBucket permissions for the bucket and its content. These permissions are the same as importing data. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. After you create a job, it can take up to a day to delete all references to the users from datasets and models. Until the job completes, Amazon Personalize continues to use the data when training. And if you use a User Segmentation recipe, the users might appear in user segments. Status A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED To get the status of the data deletion job, call DescribeDataDeletionJob API operation and specify the Amazon Resource Name (ARN) of the job. If the status is FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListDataDeletionJobs DescribeDataDeletionJob

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the data deletion job created by CreateDataDeletionJob, including the job status.

SELECT
creation_date_time,
data_deletion_job_arn,
data_source,
dataset_group_arn,
failure_reason,
job_name,
last_updated_date_time,
num_deleted,
role_arn,
status
FROM aws.personalize.data_deletion_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a batch job that deletes all references to specific users from an Amazon Personalize dataset group in batches. You specify the users to delete in a CSV file of userIds in an Amazon S3 bucket. After a job completes, Amazon Personalize no longer trains on the users’ data and no longer considers the users when generating user segments. For more information about creating a data deletion job, see Deleting users. Your input file must be a CSV file with a single USER_ID column that lists the users IDs. For more information about preparing the CSV file, see Preparing your data deletion file and uploading it to Amazon S3. To give Amazon Personalize permission to access your input CSV file of userIds, you must specify an IAM service role that has permission to read from the data source. This role needs GetObject and ListBucket permissions for the bucket and its content. These permissions are the same as importing data. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. After you create a job, it can take up to a day to delete all references to the users from datasets and models. Until the job completes, Amazon Personalize continues to use the data when training. And if you use a User Segmentation recipe, the users might appear in user segments. Status A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED To get the status of the data deletion job, call DescribeDataDeletionJob API operation and specify the Amazon Resource Name (ARN) of the job. If the status is FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListDataDeletionJobs DescribeDataDeletionJob

INSERT INTO aws.personalize.data_deletion_jobs (
jobName,
datasetGroupArn,
dataSource,
roleArn,
tags,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ datasetGroupArn }}' /* required */,
'{{ dataSource }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
data_deletion_job_arn
;