# Medallia schema ERD

Table and field reference for the Fivetran Medallia connector.

## Table & Field Reference

### survey_program

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| activation_date | Instant |  |
| modified_by | String |  |
| modified_on | Instant |  |
| name | String |  |

### unit

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| identifier | String | PK |
| city | String |  |
| name | String |  |
| postal_code | String |  |
| street_address | String |  |
| timezone | String |  |

### group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| name | String |  |

### unit_group

| Column | Type | Keys |
| --- | --- | --- |
| group_id | String | PK, FK |
| unit_id | Long | PK, FK |

### feedback_topic

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| feedback_id | Long | FK |
| question_id | String | FK |
| comment | String |  |
| topic_id | Long |  |
| topic_name | String |  |

### feedback_theme

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| feedback_id | Long | FK |
| question_id | String | FK |
| comment | String |  |
| theme_id | Long |  |
| theme_name | String |  |

### feedback_answer

| Column | Type | Keys |
| --- | --- | --- |
| feedback_id | Long | PK, FK |
| question_id | String | PK, FK |
| value | String | PK, FK |
| rank | Int |  |

### feedback_theme_region

| Column | Type | Keys |
| --- | --- | --- |
| end_index | Int | PK |
| start_index | Int | PK |
| feedback_theme_id | String | PK, FK |
| value | String |  |

### feedback_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| a_unit_identifier | String | FK |
| e_accepteddate | Instant |  |
| e_creationdate | Instant |  |
| e_expirationdate | Instant |  |
| e_lastupdated | Instant |  |
| e_responsedate | Instant |  |
| e_status | String |  |
| e_survey_method | String |  |
| e_survey_source | String |  |

### feedback_topic_region

| Column | Type | Keys |
| --- | --- | --- |
| end_index | Int | PK |
| start_index | Int | PK |
| feedback_topic_id | String | PK, FK |
| value | String |  |

### feedback_sentiment_region

| Column | Type | Keys |
| --- | --- | --- |
| end_index | Int | PK |
| start_index | Int | PK |
| feedback_sentiment_id | String | PK, FK |
| value | String |  |

### field_option

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| field_id | String | PK, FK |
| name | String |  |
| numeric_value | Int |  |

### feedback_sentiment

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| feedback_id | Long | FK |
| question_id | String | FK |
| comment | String |  |
| sentiment | String |  |

### field_meta_data

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| data_type | String |  |
| filterable | Boolean |  |
| multivalued | Boolean |  |
| name | String |  |

### survey_question

| Column | Type | Keys |
| --- | --- | --- |
| program_id | String | PK, FK |
| question_id | String | PK, FK |
| text | String |  |

### customer_profile

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |

## Relationships

- unit_group(unit_id) → unit(id)
- unit_group(group_id) → group(id)
- feedback_topic(question_id) → survey_question(question_id)
- feedback_topic(feedback_id) → feedback_history(id)
- feedback_theme(question_id) → survey_question(question_id)
- feedback_theme(feedback_id) → feedback_history(id)
- feedback_answer(feedback_id) → feedback_history(id)
- feedback_answer(question_id) → survey_question(question_id)
- feedback_answer(value) → field_option(field_id)
- feedback_theme_region(feedback_theme_id) → feedback_theme(_fivetran_id)
- feedback_history(a_unit_identifier) → unit(id)
- feedback_topic_region(feedback_topic_id) → feedback_topic(_fivetran_id)
- feedback_sentiment_region(feedback_sentiment_id) → feedback_sentiment(_fivetran_id)
- field_option(field_id) → field_meta_data(id)
- feedback_sentiment(question_id) → survey_question(question_id)
- feedback_sentiment(feedback_id) → feedback_history(id)
- survey_question(question_id) → field_meta_data(id)
- survey_question(program_id) → survey_program(id)
