batch_inference_jobs
Creates, updates, deletes, gets or lists a batch_inference_jobs resource.
Overview
| Name | batch_inference_jobs |
| Type | Resource |
| Id | aws.personalize.batch_inference_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_batch_inference_job
- list_batch_inference_jobs
| Name | Datatype | Description |
|---|---|---|
batch_inference_job_arn | string | The Amazon Resource Name (ARN) of the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
batch_inference_job_config | object | A string to string map of the configuration details of a batch inference job. |
batch_inference_job_mode | string | The job's mode. (BATCH_INFERENCE, THEME_GENERATION) |
creation_date_time | string (date-time) | The time at which the batch inference job was created. |
failure_reason | string | If the batch inference job failed, the reason for the failure. |
filter_arn | string | The ARN of the filter used on the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
job_input | object | The Amazon S3 path that leads to the input data used to generate the batch inference job. |
job_name | string | The name of the batch inference job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
job_output | object | The Amazon S3 bucket that contains the output data generated by the batch inference job. |
last_updated_date_time | string (date-time) | The time at which the batch inference job was last updated. |
num_results | integer | The number of recommendations generated by the batch inference job. This number includes the error messages generated for failed input records. |
role_arn | string | The ARN of the Amazon Identity and Access Management (IAM) role that requested the batch inference job. (pattern: <code>arn:([a-z\d-]+):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
solution_version_arn | string | The Amazon Resource Name (ARN) of the solution version from which the batch inference job was created. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the batch inference job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED |
theme_generation_config | object | The job's theme generation settings. |
| Name | Datatype | Description |
|---|---|---|
batch_inference_job_arn | string | The Amazon Resource Name (ARN) of the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
batch_inference_job_mode | string | The job's mode. (BATCH_INFERENCE, THEME_GENERATION) |
creation_date_time | string (date-time) | The time at which the batch inference job was created. |
failure_reason | string | If the batch inference job failed, the reason for the failure. |
job_name | string | The name of the batch inference job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
last_updated_date_time | string (date-time) | The time at which the batch inference job was last updated. |
solution_version_arn | string | The ARN of the solution version used by the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the batch inference job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_batch_inference_job | select | region | Gets the properties of a batch inference job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate the recommendations. | |
list_batch_inference_jobs | select | region | Gets a list of the batch inference jobs that have been performed off of a solution version. | |
create_batch_inference_job | insert | region, jobName, solutionVersionArn, jobInput, jobOutput, roleArn | Generates batch recommendations based on a list of items or users stored in Amazon S3 and exports the recommendations to an Amazon S3 bucket. To generate batch recommendations, specify the ARN of a solution version and an Amazon S3 URI for the input and output data. For user personalization, popular items, and personalized ranking solutions, the batch inference job generates a list of recommended items for each user ID in the input file. For related items solutions, the job generates a list of recommended items for each item ID in the input file. For more information, see Creating a batch inference job . If you use the Similar-Items recipe, Amazon Personalize can add descriptive themes to batch recommendations. To generate themes, set the job's mode to THEME_GENERATION and specify the name of the field that contains item names in the input data. For more information about generating themes, see Batch recommendations with themes from Content Generator . You can't get batch recommendations with the Trending-Now or Next-Best-Action recipes. |
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_batch_inference_job
- list_batch_inference_jobs
Gets the properties of a batch inference job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate the recommendations.
SELECT
batch_inference_job_arn,
batch_inference_job_config,
batch_inference_job_mode,
creation_date_time,
failure_reason,
filter_arn,
job_input,
job_name,
job_output,
last_updated_date_time,
num_results,
role_arn,
solution_version_arn,
status,
theme_generation_config
FROM aws.personalize.batch_inference_jobs
WHERE region = '{{ region }}' -- required
;
Gets a list of the batch inference jobs that have been performed off of a solution version.
SELECT
batch_inference_job_arn,
batch_inference_job_mode,
creation_date_time,
failure_reason,
job_name,
last_updated_date_time,
solution_version_arn,
status
FROM aws.personalize.batch_inference_jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_batch_inference_job
- Manifest
Generates batch recommendations based on a list of items or users stored in Amazon S3 and exports the recommendations to an Amazon S3 bucket. To generate batch recommendations, specify the ARN of a solution version and an Amazon S3 URI for the input and output data. For user personalization, popular items, and personalized ranking solutions, the batch inference job generates a list of recommended items for each user ID in the input file. For related items solutions, the job generates a list of recommended items for each item ID in the input file. For more information, see Creating a batch inference job . If you use the Similar-Items recipe, Amazon Personalize can add descriptive themes to batch recommendations. To generate themes, set the job's mode to THEME_GENERATION and specify the name of the field that contains item names in the input data. For more information about generating themes, see Batch recommendations with themes from Content Generator . You can't get batch recommendations with the Trending-Now or Next-Best-Action recipes.
INSERT INTO aws.personalize.batch_inference_jobs (
jobName,
solutionVersionArn,
filterArn,
numResults,
jobInput,
jobOutput,
roleArn,
batchInferenceJobConfig,
tags,
batchInferenceJobMode,
themeGenerationConfig,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ solutionVersionArn }}' /* required */,
'{{ filterArn }}',
{{ numResults }},
'{{ jobInput }}' /* required */,
'{{ jobOutput }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ batchInferenceJobConfig }}',
'{{ tags }}',
'{{ batchInferenceJobMode }}',
'{{ themeGenerationConfig }}',
'{{ region }}'
RETURNING
batch_inference_job_arn
;
# Description fields are for documentation purposes
- name: batch_inference_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the batch_inference_jobs resource.
- name: jobName
value: "{{ jobName }}"
description: |
The name of the batch inference job to create.
- name: solutionVersionArn
value: "{{ solutionVersionArn }}"
description: |
The Amazon Resource Name (ARN) of the solution version that will be used to generate the batch inference recommendations.
- name: filterArn
value: "{{ filterArn }}"
description: |
The ARN of the filter to apply to the batch inference job. For more information on using filters, see Filtering batch recommendations.
- name: numResults
value: {{ numResults }}
description: |
The number of recommendations to retrieve.
- name: jobInput
description: |
The Amazon S3 path that leads to the input file to base your recommendations on. The input material must be in JSON format.
value:
s3DataSource:
path: "{{ path }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: jobOutput
description: |
The path to the Amazon S3 bucket where the job's output will be stored.
value:
s3DataDestination:
path: "{{ path }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: roleArn
value: "{{ roleArn }}"
description: |
The ARN of the Amazon Identity and Access Management role that has permissions to read and write to your input and output Amazon S3 buckets respectively.
- name: batchInferenceJobConfig
description: |
The configuration details of a batch inference job.
value:
itemExplorationConfig: "{{ itemExplorationConfig }}"
rankingInfluence: "{{ rankingInfluence }}"
- name: tags
description: |
A list of tags to apply to the batch inference job.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"
- name: batchInferenceJobMode
value: "{{ batchInferenceJobMode }}"
description: |
The mode of the batch inference job. To generate descriptive themes for groups of similar items, set the job mode to THEME_GENERATION. If you don't want to generate themes, use the default BATCH_INFERENCE. When you get batch recommendations with themes, you will incur additional costs. For more information, see Amazon Personalize pricing.
valid_values: ['BATCH_INFERENCE', 'THEME_GENERATION']
- name: themeGenerationConfig
description: |
For theme generation jobs, specify the name of the column in your Items dataset that contains each item's name.
value:
fieldsForThemeGeneration:
itemName: "{{ itemName }}"