Skip to main content

training_datasets

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

Overview

Nametraining_datasets
TypeResource
Idaws.cleanroomsml.training_datasets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the training dataset. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
create_timestring (date-time)The time at which the training dataset was created.
descriptionstringThe description of the training dataset. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>)
role_arnstringThe IAM role used to read the training data. (pattern: <code>arn:aws[-a-z]*:iam::[0-9]{12}:role/.+</code>)
statusstringThe status of the training dataset. (ACTIVE)
tagsobjectThe tags that are assigned to this training dataset.
training_dataarrayMetadata about the requested training data.
training_dataset_arnstringThe Amazon Resource Name (ARN) of the training dataset. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:training-dataset/[-a-zA-Z0-9_/.]+</code>)
update_timestring (date-time)The most recent time at which the training dataset was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_training_datasetselecttraining_dataset_arn, regionReturns information about a training dataset.
list_training_datasetsselectregionnextToken, maxResultsReturns a list of training datasets.
create_training_datasetinsertregion, name, roleArn, trainingDataDefines the information necessary to create a training dataset. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation.
delete_training_datasetdeletetraining_dataset_arn, regionSpecifies a training dataset that you want to delete. You can't delete a training dataset if there are any audience models that depend on the training dataset. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation. This action deletes the metadata.

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)
training_dataset_arnstringThe Amazon Resource Name (ARN) of the training dataset that you want to delete.
maxResultsintegerThe maximum size of the results that is returned per call.
nextTokenstringThe token value retrieved from a previous call to access the next page of results.

SELECT examples

Returns information about a training dataset.

SELECT
name,
create_time,
description,
role_arn,
status,
tags,
training_data,
training_dataset_arn,
update_time
FROM aws.cleanroomsml.training_datasets
WHERE training_dataset_arn = '{{ training_dataset_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Defines the information necessary to create a training dataset. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation.

INSERT INTO aws.cleanroomsml.training_datasets (
name,
roleArn,
trainingData,
tags,
description,
region
)
SELECT
'{{ name }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ trainingData }}' /* required */,
'{{ tags }}',
'{{ description }}',
'{{ region }}'
RETURNING
training_dataset_arn
;

DELETE examples

Specifies a training dataset that you want to delete. You can't delete a training dataset if there are any audience models that depend on the training dataset. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation. This action deletes the metadata.

DELETE FROM aws.cleanroomsml.training_datasets
WHERE training_dataset_arn = '{{ training_dataset_arn }}' --required
AND region = '{{ region }}' --required
;