datasets
Creates, updates, deletes or gets a dataset
resource or lists datasets
in a region
Overview
Name | datasets |
Type | Resource |
Description | Resource schema for AWS::Personalize::Dataset. |
Id | aws.personalize.datasets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name for the dataset |
dataset_arn | string | The ARN of the dataset |
dataset_type | string | The type of dataset |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group to add the dataset to |
schema_arn | string | The ARN of the schema to associate with the dataset. The schema defines the dataset fields. |
dataset_import_job | object | Initial DatasetImportJob for the created dataset |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, DatasetType, DatasetGroupArn, SchemaArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.personalize.datasets (
Name,
DatasetType,
DatasetGroupArn,
SchemaArn,
region
)
SELECT
'{{ Name }}',
'{{ DatasetType }}',
'{{ DatasetGroupArn }}',
'{{ SchemaArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.personalize.datasets (
Name,
DatasetType,
DatasetGroupArn,
SchemaArn,
DatasetImportJob,
region
)
SELECT
'{{ Name }}',
'{{ DatasetType }}',
'{{ DatasetGroupArn }}',
'{{ SchemaArn }}',
'{{ DatasetImportJob }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dataset
props:
- name: Name
value: '{{ Name }}'
- name: DatasetType
value: '{{ DatasetType }}'
- name: DatasetGroupArn
value: '{{ DatasetGroupArn }}'
- name: SchemaArn
value: '{{ SchemaArn }}'
- name: DatasetImportJob
value:
JobName: '{{ JobName }}'
DatasetImportJobArn: '{{ DatasetImportJobArn }}'
DatasetArn: '{{ DatasetArn }}'
DataSource:
DataLocation: '{{ DataLocation }}'
RoleArn: '{{ RoleArn }}'
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