Skip to main content

datasets

Creates, updates, deletes or gets a dataset resource or lists datasets in a region

Overview

Namedatasets
TypeResource
DescriptionResource schema for AWS::Personalize::Dataset.
Idaws.personalize.datasets

Fields

NameDatatypeDescription
namestringThe name for the dataset
dataset_arnstringThe ARN of the dataset
dataset_typestringThe type of dataset
dataset_group_arnstringThe Amazon Resource Name (ARN) of the dataset group to add the dataset to
schema_arnstringThe ARN of the schema to associate with the dataset. The schema defines the dataset fields.
dataset_import_jobobjectInitial DatasetImportJob for the created dataset
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, DatasetType, DatasetGroupArn, SchemaArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all datasets in a region.

SELECT
region,
name,
dataset_arn,
dataset_type,
dataset_group_arn,
schema_arn,
dataset_import_job
FROM aws.personalize.datasets
WHERE region = 'us-east-1';

Gets all properties from an individual dataset.

SELECT
region,
name,
dataset_arn,
dataset_type,
dataset_group_arn,
schema_arn,
dataset_import_job
FROM aws.personalize.datasets
WHERE region = 'us-east-1' AND data__Identifier = '<DatasetArn>';

INSERT example

Use the following StackQL query and manifest file to create a new dataset resource, using stack-deploy.

/*+ create */
INSERT INTO aws.personalize.datasets (
Name,
DatasetType,
DatasetGroupArn,
SchemaArn,
region
)
SELECT
'{{ Name }}',
'{{ DatasetType }}',
'{{ DatasetGroupArn }}',
'{{ SchemaArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.personalize.datasets
WHERE data__Identifier = '<DatasetArn>'
AND region = 'us-east-1';

Permissions

To operate on the datasets resource, the following permissions are required:

Create

personalize:CreateDataset,
personalize:DescribeDataset,
personalize:CreateDatasetImportJob,
personalize:DescribeDatasetImportJob,
iam:PassRole

Read

personalize:DescribeDataset

Update

personalize:DescribeDataset,
personalize:CreateDatasetImportJob,
personalize:DescribeDatasetImportJob,
iam:PassRole

Delete

personalize:DeleteDataset,
personalize:DescribeDataset

List

personalize:ListDatasets