Tracking Methods
Data Warehouse
Sending Events

Sending Events

Format Data for Mixpanel Ingestion

To import data from a warehouse directly, you need to format tables correctly.

Each column in the table will be mapped as a property on the event.

Read more about best practices for tracking Events and Properties in Mixpanel here.

The following columns should be mapped from your warehouse table:

Event NameSTRINGThe name of the event that occurred. This can be specified as a table column that contains the event name, or as a static value (one event name for the whole table).
Event TimeTIMESTAMPThe time when an event occurred.
Distinct IDSTRING, INTThe identifier of the user that performed the event. Learn more about identifying users.
Insert TimeTIMESTAMPThe time when the event was inserted into the warehouse. This is used as a watermark to figure out which events are new and ingest them.
Insert ID OptionalSTRINGA unique identifier of the event. We recommend this as a best practice in case duplicate events need to be reconciled.
JSON Properties OptionalJSONIf your table stores data in a JSON column, you may chose to ingest that data as event properties. If there is a conflict between the name of a table column and one of the keys in the JSON column, the table column will take precedence.

Event Tables

Once you have created a warehouse source, follow the below steps to send events into Mixpanel.

  1. Go to Project Settings > Warehouse Data.
  2. Click on + Create and select Event Table.
  3. Select your warehouse as source from the dropdown.
  4. Navigate to the dataset or database where your Events table is.
  5. Select the Table.
  6. Specify the Event Name:
    • You can specify the column which has the event name.
    • OR You can specify the event name for all the events.
  7. Specify the Event Time:
    • This is the time the event occurred.
  8. Select the column to be used for Insert ID.
  9. Identity Management:
    • If your project has Simplified ID Merge, the warehouse connector will prompt you to map the $device_id and $user_id properties to columns in your table during setup. For more information on how we map those fields to the resulting distinct id, refer to our documentation here.
    • If your project has Original ID Merge, the warehouse connector will prompt you to map the Distinct ID column. This column represents the entity to which the events belong; it could be a user or a device. If you want to map two entities together you have to additionally call either $identify, $merge, $alias functions, along with their corresponding properties. For more information, refer to our documentation here.
  10. Check the preview to ensure that everything looks correct, and then create the event.

Was this page useful?