Skip to main content

dataset_import_jobs

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

Overview

Namedataset_import_jobs
TypeResource
Idaws.personalize.dataset_import_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 dataset import job.
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_arnstringThe Amazon Resource Name (ARN) of the dataset that receives the imported data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
dataset_import_job_arnstringThe ARN of the dataset import job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
failure_reasonstringIf a dataset import job fails, provides the reason why.
import_modestringThe import mode used by the dataset import job to import new records. (FULL, INCREMENTAL)
job_namestringThe name of the import 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 dataset was last updated.
publish_attribution_metrics_to_s3booleanWhether the job publishes metrics to Amazon S3 for a metric attribution.
role_arnstringThe ARN of the IAM role that has permissions to read from the Amazon S3 data source. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
statusstringThe status of the dataset import job. A dataset import job can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_dataset_import_jobselectregionDescribes the dataset import job created by CreateDatasetImportJob, including the import job status.
list_dataset_import_jobsselectregionReturns a list of dataset import jobs that use the given dataset. When a dataset is not specified, all the dataset import jobs associated with the account are listed. The response provides the properties for each dataset import job, including the Amazon Resource Name (ARN). For more information on dataset import jobs, see CreateDatasetImportJob. For more information on datasets, see CreateDataset.
create_dataset_import_jobinsertregion, jobName, datasetArn, dataSourceCreates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an IAM service role that has permission to read from the data source, as Amazon Personalize makes a copy of your data and processes it internally. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. If you already created a recommender or deployed a custom solution version with a campaign, how new bulk records influence recommendations depends on the domain use case or recipe that you use. For more information, see How new data influences real-time recommendations. By default, a dataset import job replaces any existing data in the dataset that you imported in bulk. To add new records without replacing existing data, specify INCREMENTAL for the import mode in the CreateDatasetImportJob operation. Status A dataset import job can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import 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. Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset. Related APIs ListDatasetImportJobs DescribeDatasetImportJob

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 dataset import job created by CreateDatasetImportJob, including the import job status.

SELECT
creation_date_time,
data_source,
dataset_arn,
dataset_import_job_arn,
failure_reason,
import_mode,
job_name,
last_updated_date_time,
publish_attribution_metrics_to_s3,
role_arn,
status
FROM aws.personalize.dataset_import_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an IAM service role that has permission to read from the data source, as Amazon Personalize makes a copy of your data and processes it internally. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. If you already created a recommender or deployed a custom solution version with a campaign, how new bulk records influence recommendations depends on the domain use case or recipe that you use. For more information, see How new data influences real-time recommendations. By default, a dataset import job replaces any existing data in the dataset that you imported in bulk. To add new records without replacing existing data, specify INCREMENTAL for the import mode in the CreateDatasetImportJob operation. Status A dataset import job can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import 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. Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset. Related APIs ListDatasetImportJobs DescribeDatasetImportJob

INSERT INTO aws.personalize.dataset_import_jobs (
jobName,
datasetArn,
dataSource,
roleArn,
tags,
importMode,
publishAttributionMetricsToS3,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ datasetArn }}' /* required */,
'{{ dataSource }}' /* required */,
'{{ roleArn }}',
'{{ tags }}',
'{{ importMode }}',
{{ publishAttributionMetricsToS3 }},
'{{ region }}'
RETURNING
dataset_import_job_arn
;