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 (opens in a new tab).
The following columns are required:
- Event Time
- Distinct ID
- Insert ID
- This is an optional field, but we recommend it as a best practice in case duplicate events need to be reconciled.
- Insert Time
- We expect this to be a monotonically increasing TIMESTAMP_NTZ. We use this as a water mark to figure out which events are new and ingest them.
- Event Name
- You can specify the column that has this value.
- Alternatively, you can specify a static value during creation.
Event Tables
Once you have created a warehouse source, follow the below steps to send events into Mixpanel.
- Go to Project Settings > Warehouse Data.
- Click on + Create and select Event Table.
- Select your warehouse as source from the dropdown.
- Navigate to the dataset or database where your Events table is.
- Select the Table.
- 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.
- Specify the Event Time:
- This is the time the event occurred.
- Select the column to be used for Insert ID.
- 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 (opens in a new tab). - 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 (opens in a new tab).
- If your project has Simplified ID Merge, the warehouse connector will prompt you to map the
- Check the preview to ensure that everything looks correct, and then create the event.