Build a warehouse-native data model

  • Updated

In Warehouse-native Amplitude, data models are the building blocks of analyses. A data model in Amplitude is a table or view in your Snowflake instance that you can use to create queries and reports. You can use multiple data models when creating an analysis in Amplitude. 

While the following data types are similar to 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 currently supports the following data model types:

Type Mandatory Fields Description
Events

Unique ID

Timestamp (TIMESTAMP_NTZ)

A specific action or interaction that is recorded and associated with a timestamp. This ID will be used 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 is recorded.

 

Create a data model

To create a data model, follow these steps:

  1. Within a Warehouse-native project, navigate to Amplitude Data and click Add Models.
  2. Select your preferred option for the base table to be used.

    With the Table Selection option, you can select the database, schema, and table/view via the respective dropdowns. The values in the dropdown will reflect the access you’ve granted to the set of credentials used for Warehouse-native Amplitude.

    The SQL Query option provides more flexibility in creating the base table. It enables you to join multiple tables or filter out rows, as well as incorporate any level of SQL you need to create the base table needed for mapping.

  3. Once you’ve selected a table, fill out the required fields on the right-hand side. The supported data types are listed in the table above.
  4. Next, map the columns in the selected table/view. The supported data types are listed in the table above. 
  5. From there, you can select or deselect any columns contained in the table.

    NOTE: 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.

  6. When you’re done configuring the mapping of the model, click Save and give your model a name.