datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | aws.personalize.datasets |
Fields
The following fields are returned by SELECT queries:
- describe_dataset
- list_datasets
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the dataset. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The creation date and time (in Unix time) of the dataset. |
dataset_arn | string | The Amazon Resource Name (ARN) of the dataset that you want metadata for. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
dataset_type | string | One of the following values: Interactions Items Users Actions Action_Interactions (pattern: <code>^[A-Za-z_]+$</code>) |
last_updated_date_time | string (date-time) | A time stamp that shows when the dataset was updated. |
latest_dataset_update | object | Describes the latest update to the dataset. |
schema_arn | string | The ARN of the associated schema. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the dataset. A dataset can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS |
tracking_id | string | The ID of the event tracker for an Action interactions dataset. You specify the tracker's ID in the PutActionInteractions API operation. Amazon Personalize uses it to direct new data to the Action interactions dataset in your dataset group. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the dataset. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The date and time (in Unix time) that the dataset was created. |
dataset_arn | string | The Amazon Resource Name (ARN) of the dataset. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
dataset_type | string | The dataset type. One of the following values: Interactions Items Users Event-Interactions (pattern: <code>^[A-Za-z_]+$</code>) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the dataset was last updated. |
status | string | The status of the dataset. A dataset can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_dataset | select | region | Describes the given dataset. For more information on datasets, see CreateDataset. | |
list_datasets | select | region | Returns the list of datasets contained in the given dataset group. The response provides the properties for each dataset, including the Amazon Resource Name (ARN). For more information on datasets, see CreateDataset. | |
create_dataset | insert | region, name, schemaArn, datasetGroupArn, datasetType | Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset. There are 5 types of datasets: Item interactions Items Users Action interactions Actions Each dataset type has an associated schema with required field types. Only the Item interactions dataset is required in order to train a model (also referred to as creating a solution). A dataset can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS To get the status of the dataset, call DescribeDataset. Related APIs CreateDatasetGroup ListDatasets DescribeDataset DeleteDataset | |
update_dataset | update | region, datasetArn, schemaArn | Update a dataset to replace its schema with a new or existing one. For more information, see Replacing a dataset's schema. | |
delete_dataset | delete | region | Deletes a dataset. You can't delete a dataset if an associated DatasetImportJob or SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information about deleting datasets, see Deleting a dataset. |
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_dataset
- list_datasets
Describes the given dataset. For more information on datasets, see CreateDataset.
SELECT
name,
creation_date_time,
dataset_arn,
dataset_group_arn,
dataset_type,
last_updated_date_time,
latest_dataset_update,
schema_arn,
status,
tracking_id
FROM aws.personalize.datasets
WHERE region = '{{ region }}' -- required
;
Returns the list of datasets contained in the given dataset group. The response provides the properties for each dataset, including the Amazon Resource Name (ARN). For more information on datasets, see CreateDataset.
SELECT
name,
creation_date_time,
dataset_arn,
dataset_type,
last_updated_date_time,
status
FROM aws.personalize.datasets
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_dataset
- Manifest
Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset. There are 5 types of datasets: Item interactions Items Users Action interactions Actions Each dataset type has an associated schema with required field types. Only the Item interactions dataset is required in order to train a model (also referred to as creating a solution). A dataset can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS To get the status of the dataset, call DescribeDataset. Related APIs CreateDatasetGroup ListDatasets DescribeDataset DeleteDataset
INSERT INTO aws.personalize.datasets (
name,
schemaArn,
datasetGroupArn,
datasetType,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ schemaArn }}' /* required */,
'{{ datasetGroupArn }}' /* required */,
'{{ datasetType }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
dataset_arn
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the datasets resource.
- name: name
value: "{{ name }}"
description: |
The name for the dataset.
- name: schemaArn
value: "{{ schemaArn }}"
description: |
The ARN of the schema to associate with the dataset. The schema defines the dataset fields.
- name: datasetGroupArn
value: "{{ datasetGroupArn }}"
description: |
The Amazon Resource Name (ARN) of the dataset group to add the dataset to.
- name: datasetType
value: "{{ datasetType }}"
description: |
The type of dataset. One of the following (case insensitive) values: Interactions Items Users Actions Action_Interactions
- name: tags
description: |
A list of tags to apply to the dataset.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"
UPDATE examples
- update_dataset
Update a dataset to replace its schema with a new or existing one. For more information, see Replacing a dataset's schema.
UPDATE aws.personalize.datasets
SET
datasetArn = '{{ datasetArn }}',
schemaArn = '{{ schemaArn }}'
WHERE
region = '{{ region }}' --required
AND datasetArn = '{{ datasetArn }}' --required
AND schemaArn = '{{ schemaArn }}' --required
RETURNING
dataset_arn;
DELETE examples
- delete_dataset
Deletes a dataset. You can't delete a dataset if an associated DatasetImportJob or SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information about deleting datasets, see Deleting a dataset.
DELETE FROM aws.personalize.datasets
WHERE region = '{{ region }}' --required
;