Skip to content

Schema

Source: src/AWS/Personalize/Schema.ts

An Amazon Personalize schema — an Avro definition that describes the fields of a dataset (Interactions, Items, Users, …). Schemas are immutable once created; changing any property replaces the schema.

const schema = yield* Personalize.Schema("Interactions", {
schema: JSON.stringify({
type: "record",
name: "Interactions",
namespace: "com.amazonaws.personalize.schema",
fields: [
{ name: "USER_ID", type: "string" },
{ name: "ITEM_ID", type: "string" },
{ name: "TIMESTAMP", type: "long" },
],
version: "1.0",
}),
});