training_datasets
Creates, updates, deletes, gets or lists a training_datasets resource.
Overview
| Name | training_datasets |
| Type | Resource |
| Id | aws.cleanroomsml.training_datasets |
Fields
The following fields are returned by SELECT queries:
- get_training_dataset
- list_training_datasets
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the training dataset. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
create_time | string (date-time) | The time at which the training dataset was created. |
description | string | The description of the training dataset. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
role_arn | string | The IAM role used to read the training data. (pattern: <code>arn:aws[-a-z]*:iam::[0-9]{12}:role/.+</code>) |
status | string | The status of the training dataset. (ACTIVE) |
tags | object | The tags that are assigned to this training dataset. |
training_data | array | Metadata about the requested training data. |
training_dataset_arn | string | The 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_time | string (date-time) | The most recent time at which the training dataset was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the training dataset. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
create_time | string (date-time) | The time at which the training dataset was created. |
description | string | The description of the training dataset. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
status | string | The status of the training dataset. (ACTIVE) |
training_dataset_arn | string | The 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_time | string (date-time) | The most recent time at which the training dataset was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_training_dataset | select | training_dataset_arn, region | Returns information about a training dataset. | |
list_training_datasets | select | region | nextToken, maxResults | Returns a list of training datasets. |
create_training_dataset | insert | region, name, roleArn, trainingData | 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. | |
delete_training_dataset | delete | training_dataset_arn, region | 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. |
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) |
training_dataset_arn | string | The Amazon Resource Name (ARN) of the training dataset that you want to delete. |
maxResults | integer | The maximum size of the results that is returned per call. |
nextToken | string | The token value retrieved from a previous call to access the next page of results. |
SELECT examples
- get_training_dataset
- list_training_datasets
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
;
Returns a list of training datasets.
SELECT
name,
create_time,
description,
status,
training_dataset_arn,
update_time
FROM aws.cleanroomsml.training_datasets
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_training_dataset
- Manifest
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
;
# Description fields are for documentation purposes
- name: training_datasets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the training_datasets resource.
- name: name
value: "{{ name }}"
- name: roleArn
value: "{{ roleArn }}"
- name: trainingData
value:
- type_: "{{ type_ }}"
inputConfig:
schema:
- columnName: "{{ columnName }}"
columnTypes: "{{ columnTypes }}"
dataSource:
glueDataSource:
tableName: "{{ tableName }}"
databaseName: "{{ databaseName }}"
catalogId: "{{ catalogId }}"
- name: tags
value: "{{ tags }}"
- name: description
value: "{{ description }}"
DELETE examples
- delete_training_dataset
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
;