Skip to main content

batch_inference_jobs

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

Overview

Namebatch_inference_jobs
TypeResource
Idaws.personalize.batch_inference_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
batch_inference_job_arnstringThe Amazon Resource Name (ARN) of the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
batch_inference_job_configobjectA string to string map of the configuration details of a batch inference job.
batch_inference_job_modestringThe job's mode. (BATCH_INFERENCE, THEME_GENERATION)
creation_date_timestring (date-time)The time at which the batch inference job was created.
failure_reasonstringIf the batch inference job failed, the reason for the failure.
filter_arnstringThe ARN of the filter used on the batch inference job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
job_inputobjectThe Amazon S3 path that leads to the input data used to generate the batch inference job.
job_namestringThe name of the batch inference job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)
job_outputobjectThe Amazon S3 bucket that contains the output data generated by the batch inference job.
last_updated_date_timestring (date-time)The time at which the batch inference job was last updated.
num_resultsintegerThe number of recommendations generated by the batch inference job. This number includes the error messages generated for failed input records.
role_arnstringThe 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_arnstringThe Amazon Resource Name (ARN) of the solution version from which the batch inference job was created. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
statusstringThe status of the batch inference job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED
theme_generation_configobjectThe job's theme generation settings.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_batch_inference_jobselectregionGets 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_jobsselectregionGets a list of the batch inference jobs that have been performed off of a solution version.
create_batch_inference_jobinsertregion, jobName, solutionVersionArn, jobInput, jobOutput, roleArnGenerates 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.

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

SELECT examples

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
;

INSERT examples

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
;