Personalize / Client / create_schema

create_schema#

Personalize.Client.create_schema(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.create_schema(
    name='string',
    schema='string',
    domain='ECOMMERCE'|'VIDEO_ON_DEMAND'
)
Parameters:
  • name (string) –

    [REQUIRED]

    The name for the schema.

  • schema (string) –

    [REQUIRED]

    A schema in Avro JSON format.

  • domain (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'schemaArn': 'string'
}

Response Structure

  • (dict) –

    • schemaArn (string) –

      The Amazon Resource Name (ARN) of the created schema.

Exceptions