schemas
Creates, updates, deletes, gets or lists a schemas resource.
Overview
| Name | schemas |
| Type | Resource |
| Id | aws.personalize.schemas |
Fields
The following fields are returned by SELECT queries:
- describe_schema
- list_schemas
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the schema. (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 schema was created. |
domain | string | The domain of a schema that you created for a dataset in a Domain dataset group. (ECOMMERCE, VIDEO_ON_DEMAND) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the schema was last updated. |
schema | string | The schema. |
schema_arn | string | The Amazon Resource Name (ARN) of the schema. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the schema. (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 schema was created. |
domain | string | The domain of a schema that you created for a dataset in a Domain dataset group. (ECOMMERCE, VIDEO_ON_DEMAND) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the schema was last updated. |
schema_arn | string | The Amazon Resource Name (ARN) of the schema. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_schema | select | region | Describes a schema. For more information on schemas, see CreateSchema. | |
list_schemas | select | region | Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema. | |
create_schema | insert | region, name, schema | Creates an Amazon Personalize schema from the specified schema string. The schema you create must be in Avro JSON format. Amazon Personalize recognizes three schema variants. Each schema is associated with a dataset type and has a set of required field and keywords. If you are creating a schema for a dataset in a Domain dataset group, you provide the domain of the Domain dataset group. You specify a schema when you call CreateDataset. Related APIs ListSchemas DescribeSchema DeleteSchema | |
delete_schema | delete | region | Deletes a schema. Before deleting a schema, you must delete all datasets referencing the schema. For more information on schemas, see CreateSchema. |
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_schema
- list_schemas
Describes a schema. For more information on schemas, see CreateSchema.
SELECT
name,
creation_date_time,
domain,
last_updated_date_time,
schema,
schema_arn
FROM aws.personalize.schemas
WHERE region = '{{ region }}' -- required
;
Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema.
SELECT
name,
creation_date_time,
domain,
last_updated_date_time,
schema_arn
FROM aws.personalize.schemas
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_schema
- Manifest
Creates an Amazon Personalize schema from the specified schema string. The schema you create must be in Avro JSON format. Amazon Personalize recognizes three schema variants. Each schema is associated with a dataset type and has a set of required field and keywords. If you are creating a schema for a dataset in a Domain dataset group, you provide the domain of the Domain dataset group. You specify a schema when you call CreateDataset. Related APIs ListSchemas DescribeSchema DeleteSchema
INSERT INTO aws.personalize.schemas (
name,
schema,
domain,
region
)
SELECT
'{{ name }}' /* required */,
'{{ schema }}' /* required */,
'{{ domain }}',
'{{ region }}'
RETURNING
schema_arn
;
# Description fields are for documentation purposes
- name: schemas
props:
- name: region
value: "{{ region }}"
description: Required parameter for the schemas resource.
- name: name
value: "{{ name }}"
description: |
The name for the schema.
- name: schema
value: "{{ schema }}"
description: |
A schema in Avro JSON format.
- name: domain
value: "{{ domain }}"
description: |
The domain for the schema. If you are creating a schema for a dataset in a Domain dataset group, specify the domain you chose when you created the Domain dataset group.
valid_values: ['ECOMMERCE', 'VIDEO_ON_DEMAND']
DELETE examples
- delete_schema
Deletes a schema. Before deleting a schema, you must delete all datasets referencing the schema. For more information on schemas, see CreateSchema.
DELETE FROM aws.personalize.schemas
WHERE region = '{{ region }}' --required
;