dataset_import_jobs
Creates, updates, deletes, gets or lists a dataset_import_jobs resource.
Overview
| Name | dataset_import_jobs |
| Type | Resource |
| Id | aws.personalize.dataset_import_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_dataset_import_job
- list_dataset_import_jobs
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The creation date and time (in Unix time) of the dataset import job. |
data_source | object | Describes the data source that contains the data to upload to a dataset, or the list of records to delete from Amazon Personalize. |
dataset_arn | string | The Amazon Resource Name (ARN) of the dataset that receives the imported data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
dataset_import_job_arn | string | The ARN of the dataset import job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
failure_reason | string | If a dataset import job fails, provides the reason why. |
import_mode | string | The import mode used by the dataset import job to import new records. (FULL, INCREMENTAL) |
job_name | string | The name of the import job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) the dataset was last updated. |
publish_attribution_metrics_to_s3 | boolean | Whether the job publishes metrics to Amazon S3 for a metric attribution. |
role_arn | string | The ARN of the IAM role that has permissions to read from the Amazon S3 data source. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The 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 |
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The date and time (in Unix time) that the dataset import job was created. |
dataset_import_job_arn | string | The Amazon Resource Name (ARN) of the dataset import job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
failure_reason | string | If a dataset import job fails, the reason behind the failure. |
import_mode | string | The import mode the dataset import job used to update the data in the dataset. For more information see Updating existing bulk data. (FULL, INCREMENTAL) |
job_name | string | The name of the dataset import job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the dataset import job status was last updated. |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_dataset_import_job | select | region | Describes the dataset import job created by CreateDatasetImportJob, including the import job status. | |
list_dataset_import_jobs | select | region | Returns 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_job | insert | region, jobName, datasetArn, dataSource | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_dataset_import_job
- list_dataset_import_jobs
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
;
Returns 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.
SELECT
creation_date_time,
dataset_import_job_arn,
failure_reason,
import_mode,
job_name,
last_updated_date_time,
status
FROM aws.personalize.dataset_import_jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_dataset_import_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: dataset_import_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the dataset_import_jobs resource.
- name: jobName
value: "{{ jobName }}"
description: |
The name for the dataset import job.
- name: datasetArn
value: "{{ datasetArn }}"
description: |
The ARN of the dataset that receives the imported data.
- name: dataSource
description: |
The Amazon S3 bucket that contains the training data to import.
value:
dataLocation: "{{ dataLocation }}"
- name: roleArn
value: "{{ roleArn }}"
description: |
The ARN of the IAM role that has permissions to read from the Amazon S3 data source.
- name: tags
description: |
A list of tags to apply to the dataset import job.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"
- name: importMode
value: "{{ importMode }}"
description: |
Specify how to add the new records to an existing dataset. The default import mode is FULL. If you haven't imported bulk records into the dataset previously, you can only specify FULL. Specify FULL to overwrite all existing bulk data in your dataset. Data you imported individually is not replaced. Specify INCREMENTAL to append the new records to the existing data in your dataset. Amazon Personalize replaces any record with the same ID with the new one.
valid_values: ['FULL', 'INCREMENTAL']
- name: publishAttributionMetricsToS3
value: {{ publishAttributionMetricsToS3 }}
description: |
If you created a metric attribution, specify whether to publish metrics for this import job to Amazon S3