# Amplitude schema ERD

Table and field reference for the Fivetran Amplitude connector.

## Table & Field Reference

### event

| Column | Type | Keys |
| --- | --- | --- |
| device_id | String | PK |
| id | Long | PK |
| server_upload_time | Instant | PK |
| event_type_id | Long | FK |
| _insert_id | String |  |
| ad_id | String |  |
| amplitude_event_type | String |  |
| amplitude_id | Long |  |
| app | String |  |
| city | String |  |
| client_event_time | Instant |  |
| client_upload_time | Instant |  |
| country | String |  |
| data | Json |  |
| device_brand | String |  |
| device_carrier | String |  |
| device_family | String |  |
| device_manufacturer | String |  |
| device_model | String |  |
| device_type | String |  |
| dma | String |  |
| event_properties | Json |  |
| event_time | Instant |  |
| event_type | String |  |
| group_properties | Json |  |
| groups | Json |  |
| idfa | String |  |
| ip_address | String |  |
| is_attribution_event | Boolean |  |
| language | String |  |
| library | String |  |
| location_lat | String |  |
| location_lng | String |  |
| os_name | String |  |
| os_version | String |  |
| paying | Boolean |  |
| platform | String |  |
| processed_time | Instant |  |
| project_name | String |  |
| region | String |  |
| sample_rate | Int |  |
| schema | Int |  |
| server_received_time | Instant |  |
| session_id | Long |  |
| start_version | String |  |
| user_creation_time | Instant |  |
| user_id | String |  |
| user_properties | Json |  |
| uuid | String |  |
| version_name | String |  |

### event_type

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_name | String | PK |
| autohidden | Boolean |  |
| deleted | Boolean |  |
| display | String |  |
| flow_hidden | Boolean |  |
| hidden | Boolean |  |
| in_waitroom | Boolean |  |
| name | String |  |
| non_active | Boolean |  |
| timeline_hidden | Boolean |  |
| totals | Int |  |
| totals_delta | Long |  |
| value | String |  |
| waitroom_approved | String |  |

### event_amplitude_attribution_id

| Column | Type | Keys |
| --- | --- | --- |
| amplitude_attribution_id | String | PK |
| device_id | String | PK, FK |
| event_id | Long | PK, FK |
| server_upload_time | Instant | PK, FK |
| client_event_time | Instant |  |

## Relationships

- event(event_type_id) → event_type(id)
- event_amplitude_attribution_id(event_id) → event(device_id)
- event_amplitude_attribution_id(device_id) → event(device_id)
- event_amplitude_attribution_id(server_upload_time) → event(device_id)
