# Mixpanel schema ERD

Table and field reference for the Fivetran Mixpanel connector.

## Table & Field Reference

### android_device

| Column | Type | Keys |
| --- | --- | --- |
| device_id | String | PK |
| distinct_id | String | FK |

### collections

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### responses

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### ios_device

| Column | Type | Keys |
| --- | --- | --- |
| ios_device | String | PK |
| distinct_id | String | FK |

### survey_collections

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### transaction

| Column | Type | Keys |
| --- | --- | --- |
| time | Instant | PK |
| distinct_id | String | PK, FK |
| amount | Double |  |
| payment_service | String |  |
| payment_type | String |  |
| promo_code | String |  |
| purchase_date | Instant |  |
| subscription_type | String |  |

### answer

| Column | Type | Keys |
| --- | --- | --- |
| question_id | Long | PK |
| distinct_id | String | FK |
| answer | Boolean |  |
| collection_id | Long |  |
| question_type | String |  |
| survey_id | Long |  |
| time | Instant |  |
| value | String |  |

### surveys

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### people

| Column | Type | Keys |
| --- | --- | --- |
| distinct_id | String | PK |
| time | Instant |  |

### event

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| distinct_id | String | FK |
| event_time_ms | Long |  |
| name | String |  |
| properties | Json |  |
| time | LocalDateTime |  |

### android_invalid_push_tokens

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### deliveries

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### journeys

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

### survey_responses

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| distinct_id | String | PK, FK |
| value | Long |  |

## Relationships

- android_device(distinct_id) → people(distinct_id)
- collections(distinct_id) → people(distinct_id)
- responses(distinct_id) → people(distinct_id)
- ios_device(distinct_id) → people(distinct_id)
- survey_collections(distinct_id) → people(distinct_id)
- transaction(distinct_id) → people(distinct_id)
- answer(distinct_id) → people(distinct_id)
- surveys(distinct_id) → people(distinct_id)
- event(distinct_id) → people(distinct_id)
- android_invalid_push_tokens(distinct_id) → people(distinct_id)
- deliveries(distinct_id) → people(distinct_id)
- journeys(distinct_id) → people(distinct_id)
- survey_responses(distinct_id) → people(distinct_id)
