Skip to main content

schemas

Creates, updates, deletes, gets or lists a schemas resource.

Overview

Nameschemas
TypeResource
Idaws.personalize.schemas

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the schema. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)
creation_date_timestring (date-time)The date and time (in Unix time) that the schema was created.
domainstringThe domain of a schema that you created for a dataset in a Domain dataset group. (ECOMMERCE, VIDEO_ON_DEMAND)
last_updated_date_timestring (date-time)The date and time (in Unix time) that the schema was last updated.
schemastringThe schema.
schema_arnstringThe Amazon Resource Name (ARN) of the schema. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_schemaselectregionDescribes a schema. For more information on schemas, see CreateSchema.
list_schemasselectregionReturns 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_schemainsertregion, name, schemaCreates 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_schemadeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

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
;