Data models are the foundation for creating analyses within Warehouse-native Amplitude. Understanding how to structure your data is crucial for optimal performance and accurate insights.
While the following data types are like those used by traditional Amplitude, think of Warehouse-native events as a fact table and Warehouse-native properties (user, group, and event) as dimensional tables.
Warehouse-native Amplitude supports data types similar to the traditional platforms, with some additions:
Type | Mandatory fields | Description |
---|---|---|
Events | Unique ID Timestamp ( TIMESTAMP_NTZ ) |
A specific action or interaction that's recorded and associated with a timestamp. Amplitude uses this ID to understand the project and organization’s MTU count as well as how Amplitude will count uniques in Analytics. |
User properties (current) | Unique ID | These are current traits and attributes associated with an individual user at the present moment, such as their current preferences or recent interactions. |
User properties (historical) | Unique ID Start time End time |
These are traits and attributes associated with an individual user over time, such as historical preferences or past interactions. |
Group properties (current) | Unique ID | Current characteristics and attributes of a group at the present moment, such as name, description, or membership composition. |
Group properties (historical) | Unique ID Start time End time |
Past characteristics and attributes of a group or organization over time, such as previous name, description, or past membership composition. |
Event properties | Event ID | Current traits and attributes associated with a specific action or interaction that's recorded. |
Keep the following approaches in mind as you create your warehouse-native data model.
Most organizations connect existing event data to the Event data type model, using one of the following approaches:
Amplitude recommends the "one event per table" approach for simplicity in setup and use as part of Analytics. "Multiple event types in a single table" is possible, but can complicate configuration.
User models most often map to the User Properties data type.
You can join Event and User models with each model's user ID or unique ID.
Warehouse-native projects support multiple identity spaces. Keep in mind though, using models that cross identity spaces impacts the accuracy and usefulness of an analysis.
To join a Group model, select the corresponding ID in an existing Event or User Property model to establish the join.
Amplitude bases the data types in this article on and opinionated analysis structure. Warehouse-native Amplitude is flexible, however:
The structure of your data within a data warehouse or data lake affects Amplitude's performance. Amplitude recommends that you model data in ways that the benefit analytical workloads that Warehouse-native Amplitude generates. For more detailed best practices, see Warehouse-native Amplitude: Best Practices.
In a Warehouse-native project, navigate to Amplitude Data and click Add Models.
Select Table Selection or SQL Query as the base table option.
When the table is finished, complete the required fields. Supported data types are listed in the data types table at the top of this article.
Map the columns in the table or view you select.
Select or deselect any columns in the table.
You can update this configuration post-set up. You can also use Snowflake’s functions in the Source Column field to convert the value in the table into the desired value within Amplitude.
Click Save to name your model.
Thanks for your feedback!
June 4th, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.