Importing interactions individually
After you complete Creating a schema and a dataset to create an Item interactions dataset, you can individually import one or more new events into the dataset. To import interaction events individually, you create an event tracker and then import one or more events into your Item interactions dataset. You can import historical individual interaction events using the Amazon Personalize console, or import historical or real-time events using the Amazon Command Line Interface (Amazon CLI), or the Amazon SDKs.
This section includes information about importing events with the Amazon Personalize console. We recommend using the Amazon Personalize console to import only historical events. For information about using the Amazon CLI or the Amazon SDKs to record events in real-time, see Recording real-time events to influence recommendations.
For information about how Amazon Personalize updates filters for new records and how new records influence recommendations, see Importing individual records into an Amazon Personalize dataset.
Creating an event tracker (console)
Note
If you've created an event tracker, you can skip to Importing events individually (console).
Before you can import an event to an Interactions dataset, you must create an event tracker for the dataset group.
To create an event tracker (console)
-
Open the Amazon Personalize console at https://console.amazonaws.cn/personalize/home
and sign in to your account. -
On the Dataset groups page, choose the dataset group with the Item interactions dataset that you want to import events to.
-
On the Dashboard for the dataset group, in Install event ingestion SDK, choose Start.
-
On the Configure tracker page, in Tracker configurations, for Tracker name, provide a name for the event tracker, and choose Next.
-
The Install the SDK page shows the Tracking ID for the new event tracker and instructions for using Amazon Amplify or Amazon Lambda to stream event data.
You can ignore this information because you're using the Amazon Personalize console to upload event data. If you want to stream event data using Amazon Amplify or Amazon Lambda in the future, you can view this information by choosing the event tracker on the Event trackers page.
-
Choose Finish. You can now import events with the console (see Importing events individually (console) or record events in real time using the
PutEvents
operation (see Recording real-time events to influence recommendations).
Importing events individually (console)
After you create an event tracker, you can import events individually into an Item interactions dataset. This procedure assumes you have already created an Item interactions dataset. For information about creating datasets, see Creating a schema and a dataset.
To import events individually (console)
-
Open the Amazon Personalize console at https://console.amazonaws.cn/personalize/home
and sign in to your account. -
On the Dataset groups page, choose the dataset group with the Item interactions dataset that you want to import events to.
-
In the navigation pane, choose datasets.
-
On the Datasets page, choose the Interactions dataset.
-
At the top right of the dataset details page, choose Modify dataset, and choose Create record.
-
In Create user-item interaction record(s) page, for Record input, enter the event details in JSON format. The event's field names and values must match the schema that you used when you created the Item interactions dataset. Amazon Personalize provides a JSON template with field names and data types from this schema. You can import up to 10 events at a time.
-
Choose Create record(s). In Response, the result of the import is listed and a success or failure message is displayed.