Skip to main content

batch_segment_jobs

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

Overview

Namebatch_segment_jobs
TypeResource
Idaws.personalize.batch_segment_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
batch_segment_job_arnstringThe Amazon Resource Name (ARN) of the batch segment job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
creation_date_timestring (date-time)The time at which the batch segment job was created.
failure_reasonstringIf the batch segment job failed, the reason for the failure.
filter_arnstringThe ARN of the filter used on the batch segment 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 segment job.
job_namestringThe name of the batch segment 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 segment job.
last_updated_date_timestring (date-time)The time at which the batch segment job last updated.
num_resultsintegerThe number of predicted users generated by the batch segment job for each line of input data. The maximum number of users per segment is 5 million.
role_arnstringThe ARN of the Amazon Identity and Access Management (IAM) role that requested the batch segment 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 used by the batch segment job to generate batch segments. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
statusstringThe status of the batch segment job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_batch_segment_jobselectregionGets the properties of a batch segment job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate segments.
list_batch_segment_jobsselectregionGets a list of the batch segment jobs that have been performed off of a solution version that you specify.
create_batch_segment_jobinsertregion, jobName, solutionVersionArn, jobInput, jobOutput, roleArnCreates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments.

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 segment job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate segments.

SELECT
batch_segment_job_arn,
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
FROM aws.personalize.batch_segment_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments.

INSERT INTO aws.personalize.batch_segment_jobs (
jobName,
solutionVersionArn,
filterArn,
numResults,
jobInput,
jobOutput,
roleArn,
tags,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ solutionVersionArn }}' /* required */,
'{{ filterArn }}',
{{ numResults }},
'{{ jobInput }}' /* required */,
'{{ jobOutput }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
batch_segment_job_arn
;