# Qualtrics schema ERD

Table and field reference for the Fivetran Qualtrics connector.

## Table & Field Reference

### batch_transaction_membership

| Column | Type | Keys |
| --- | --- | --- |
| batch_id | String | PK, FK |
| directory_id | String | PK, FK |
| transaction_id | String | PK, FK |
| date_added_to_batch | Instant |  |

### survey_embedded_data

| Column | Type | Keys |
| --- | --- | --- |
| import_id | String | PK |
| key | String | PK |
| response_id | String | PK, FK |
| value | String |  |

### distribution

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| message_library_id | String | FK |
| message_message_id | String | FK |
| owner_id | String | FK |
| recipient_library_id | String | FK |
| survey_link_survey_id | String | FK |
| created_date | Instant |  |
| message_message_text | String |  |
| modified_date | Instant |  |
| organization_id | String |  |
| parent_distribution_id | String |  |
| recipient_contact_id | String |  |
| recipient_mailing_list_id | String |  |
| recipient_sample_id | String |  |
| request_status | String |  |
| request_type | String |  |
| send_date | Instant |  |
| survey_link_expiration_date | Instant |  |
| survey_link_link_type | String |  |
| header_** |  |  |
| stats_** |  |  |

### directory_mailing_list

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| owner_id | String | FK |
| creation_date | Instant |  |
| last_modified_date | Instant |  |
| name | String |  |

### question_response

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| question_id | String | FK |
| question_option_key | String | FK |
| response_id | String | FK |
| sub_question_key | String | FK |
| label | String |  |
| loop_id | String |  |
| question | String |  |
| sub_question_text | String |  |
| text | String |  |
| value | String |  |

### survey_version_publish_event

| Column | Type | Keys |
| --- | --- | --- |
| date | Instant | PK |
| survey_id | String | PK, FK |
| user_id | String | PK, FK |
| version_id | String | PK, FK |

### library_message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| library_id | String | PK, FK |
| category | String |  |
| description | String |  |

### question_option

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| question_id | String | PK, FK |
| survey_id | String | PK, FK |
| recode_value | String |  |
| text | String |  |

### quota_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | PK, FK |
| multi_match | String |  |
| name | String |  |
| public | Boolean |  |
| selected | Boolean |  |

### library

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

### directory_contact

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| creation_date | Instant |  |
| directory_unsubscribe_date | Instant |  |
| directory_unsubscribed | Boolean |  |
| email | String |  |
| email_domain | String |  |
| ext_ref | String |  |
| first_name | String |  |
| language | String |  |
| last_modified | Instant |  |
| last_name | String |  |
| phone | String |  |
| write_blanks | Boolean |  |

### directory_sample

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| creator_id | String | FK |
| owner_id | String | FK |
| category | String |  |
| creation_logic | Json |  |
| description | String |  |
| frozen | Boolean |  |
| hidden | Boolean |  |
| name | String |  |
| parent_group_id | String |  |

### transaction_batch

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| creation_date | Instant |  |

### block

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | PK, FK |
| block_locking | String |  |
| block_visibility | String |  |
| description | String |  |
| randomize_questions | String |  |
| type | String |  |

### frequency_rule

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| always_send | Boolean |  |
| days_between | Int |  |
| email_type | String |  |
| num_messages | Int |  |
| period | String |  |
| target_type | String |  |

### distribution_contact

| Column | Type | Keys |
| --- | --- | --- |
| contact_id | String | PK |
| contact_lookup_id | String | PK |
| distribution_id | String | PK |
| response_id | String | FK |
| contact_frequency_rule_id | String |  |
| opened_at | Instant |  |
| response_completed_at | Instant |  |
| response_started_at | Instant |  |
| sent_at | Instant |  |
| status | String |  |
| survey_link | String |  |
| survey_session_id | String |  |

### survey_version

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | PK, FK |
| user_id | String | FK |
| creation_date | Instant |  |
| description | String |  |
| published | Boolean |  |
| version_number | Int |  |
| was_published | Boolean |  |

### sub_question

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| question_id | String | PK, FK |
| survey_id | String | PK, FK |
| choice_data_export_tag | String |  |
| text | String |  |

### survey

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| owner_id | String | FK |
| auto_scoring_category | String |  |
| brand_base_url | String |  |
| brand_id | String |  |
| bundle_short_name | String |  |
| composition_type | String |  |
| creator_id | String |  |
| default_scoring_category | String |  |
| division_id | String |  |
| is_active | Boolean |  |
| last_accessed | Instant |  |
| last_activated | Instant |  |
| last_modified | Instant |  |
| project_category | String |  |
| project_type | String |  |
| registry_sha | String |  |
| registry_version | String |  |
| schema_version | String |  |
| scoring_summary_after_questions | Boolean |  |
| scoring_summary_after_survey | Boolean |  |
| scoring_summary_category | String |  |
| survey_name | String |  |
| survey_status | String |  |

### sms_distribution_contact

| Column | Type | Keys |
| --- | --- | --- |
| contact_id | String | PK |
| contact_lookup_id | String | PK |
| distribution_id | String | PK |
| response_id | String | FK |
| contact_frequency_rule_id | String |  |
| opened_at | Instant |  |
| response_completed_at | Instant |  |
| response_started_at | Instant |  |
| sent_at | Instant |  |
| status | String |  |
| survey_link | String |  |
| survey_session_id | String |  |

### group_quota_membership

| Column | Type | Keys |
| --- | --- | --- |
| quota_group_id | String | PK, FK |
| quota_id | String | PK, FK |

### ticket

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| source_id | String | FK |
| survey_response_id | String | FK |
| closed_at | Instant |  |
| created_at | Instant |  |
| data | Json |  |
| first_time_entered | Json |  |
| first_time_left | Json |  |
| follow_up_details | Json |  |
| most_recent_time_entered | Json |  |
| most_recent_time_left | Json |  |
| name | String |  |
| owner_name | String |  |
| priority | String |  |
| root_cause | String |  |
| source_type | String |  |
| status | String |  |
| team_name | String |  |
| updated_at | Instant |  |

### question

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | PK, FK |
| data_export_tag | String |  |
| data_visibility_hidden | Boolean |  |
| data_visibility_private | Boolean |  |
| next_answer_id | Int |  |
| next_choice_id | Int |  |
| question_description | String |  |
| question_description_option | String |  |
| question_text | String |  |
| question_text_unsafe | String |  |
| question_type | String |  |
| selector | String |  |
| sub_selector | String |  |
| validation_setting_force_response | String |  |
| validation_setting_force_response_type | String |  |
| validation_setting_type | String |  |

### library_question

| Column | Type | Keys |
| --- | --- | --- |
| folder_name | String | PK |
| library_question_id | String | PK |
| library_id | String | PK, FK |
| question_name | String |  |

### library_block

| Column | Type | Keys |
| --- | --- | --- |
| folder_name | String | PK |
| library_block_id | String | PK |
| library_id | String | PK, FK |
| block_name | String |  |

### sms_distribution

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| message_library_id | String | FK |
| message_message_id | String | FK |
| owner_id | String | FK |
| recipient_library_id | String | FK |
| recipient_transaction_batch_id | String | FK |
| recipient_transaction_id | String | FK |
| survey_id | String | FK |
| message_message_type | String |  |
| name | String |  |
| organization_id | String |  |
| recipient_contact_id | String |  |
| recipient_mailing_list_id | String |  |
| recipient_sample_id | String |  |
| request_status | String |  |
| request_type | String |  |
| send_date | Instant |  |
| survey_link_expiration_date | Instant |  |

### user

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_creation_date | Instant |  |
| account_expiration_date | Instant |  |
| account_status | String |  |
| division_id | String |  |
| email | String |  |
| first_name | String |  |
| language | String |  |
| last_login_date | Instant |  |
| last_name | String |  |
| organization_id | String |  |
| password_expiration_date | Instant |  |
| password_last_changed_date | Instant |  |
| response_count_auditable | Int |  |
| response_count_deleted | Int |  |
| response_count_generated | Int |  |
| time_zone | String |  |
| unsubscribed | Boolean |  |
| user_type | String |  |
| username | String |  |

### contact_transaction

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| directory_id | String | PK, FK |
| contact_id | String | FK |
| mailing_list_id | String | FK |
| transaction_date | Instant |  |

### survey_response

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | FK |
| distribution_channel | String |  |
| duration_in_seconds | String |  |
| end_date | Instant |  |
| external_reference | String |  |
| finished | String |  |
| ip_address | String |  |
| location_latitude | String |  |
| location_longitude | String |  |
| participant_email | String |  |
| participant_name | String |  |
| progress | String |  |
| recipient_email | String |  |
| recipient_first_name | String |  |
| recipient_last_name | String |  |
| recorded_date | Instant |  |
| start_date | Instant |  |
| status | String |  |
| user_language | String |  |

### directory

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

### block_question

| Column | Type | Keys |
| --- | --- | --- |
| block_id | String | PK, FK |
| question_id | String | PK, FK |
| survey_id | String | PK, FK |

### quota

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| survey_id | String | PK, FK |
| count | Int |  |
| count_for_undo | Int |  |
| logic_type | String |  |
| name | String |  |
| occurrences | Long |  |
| perform_action_on_user | Boolean |  |
| quota_action | String |  |
| quota_realm | String |  |

### library_survey

| Column | Type | Keys |
| --- | --- | --- |
| folder_name | String | PK |
| library_survey_id | String | PK |
| library_id | String | PK, FK |
| survey_name | String |  |

### frequency_rule_target

| Column | Type | Keys |
| --- | --- | --- |
| target_id | String | PK |
| directory_id | String | PK, FK |
| rule_id | String | PK, FK |

### contact_mailing_list_membership

| Column | Type | Keys |
| --- | --- | --- |
| contact_lookup_id | String | PK |
| contact_id | String | FK |
| directory_id | String | FK |
| mailing_list_id | String | FK |
| owner_id | String | FK |
| name | String |  |
| unsubscribe_date | Instant |  |
| unsubscribed | Boolean |  |

## Relationships

- batch_transaction_membership(batch_id) → transaction_batch(directory_id)
- batch_transaction_membership(transaction_id) → contact_transaction(directory_id)
- batch_transaction_membership(directory_id) → directory(id)
- survey_embedded_data(response_id) → survey_response(id)
- distribution(owner_id) → user(id)
- distribution(recipient_library_id) → library(id)
- distribution(message_message_id) → library_message(id)
- distribution(message_library_id) → library(id)
- distribution(survey_link_survey_id) → survey(id)
- directory_mailing_list(directory_id) → directory(id)
- directory_mailing_list(owner_id) → user(id)
- question_response(response_id) → survey_response(id)
- question_response(question_id) → question(survey_id)
- question_response(sub_question_key) → sub_question(survey_id)
- question_response(question_option_key) → question_option(survey_id)
- survey_version_publish_event(version_id) → survey_version(survey_id)
- survey_version_publish_event(survey_id) → survey(id)
- survey_version_publish_event(user_id) → user(id)
- library_message(library_id) → library(id)
- question_option(survey_id) → survey(id)
- question_option(question_id) → question(survey_id)
- quota_group(survey_id) → survey(id)
- directory_contact(directory_id) → directory(id)
- directory_sample(directory_id) → directory(id)
- directory_sample(owner_id) → user(id)
- directory_sample(creator_id) → user(id)
- transaction_batch(directory_id) → directory(id)
- block(survey_id) → survey(id)
- frequency_rule(directory_id) → directory(id)
- distribution_contact(response_id) → survey_response(id)
- survey_version(survey_id) → survey(id)
- survey_version(user_id) → user(id)
- sub_question(survey_id) → survey(id)
- sub_question(question_id) → question(survey_id)
- survey(owner_id) → user(id)
- sms_distribution_contact(response_id) → survey_response(id)
- group_quota_membership(quota_group_id) → quota_group(survey_id)
- group_quota_membership(quota_id) → quota(survey_id)
- ticket(survey_response_id) → survey_response(id)
- ticket(source_id) → survey(id)
- question(survey_id) → survey(id)
- library_question(library_id) → library(id)
- library_block(library_id) → library(id)
- sms_distribution(owner_id) → user(id)
- sms_distribution(survey_id) → survey(id)
- sms_distribution(recipient_library_id) → library(id)
- sms_distribution(recipient_transaction_batch_id) → transaction_batch(directory_id)
- sms_distribution(recipient_transaction_id) → contact_transaction(directory_id)
- sms_distribution(message_message_id) → library_message(id)
- sms_distribution(message_library_id) → library(id)
- contact_transaction(directory_id) → directory(id)
- contact_transaction(contact_id) → directory_contact(directory_id)
- contact_transaction(mailing_list_id) → directory_mailing_list(directory_id)
- survey_response(survey_id) → survey(id)
- block_question(block_id) → block(survey_id)
- block_question(survey_id) → survey(id)
- block_question(question_id) → question(survey_id)
- quota(survey_id) → survey(id)
- library_survey(library_id) → library(id)
- frequency_rule_target(directory_id) → directory(id)
- frequency_rule_target(rule_id) → frequency_rule(directory_id)
- contact_mailing_list_membership(mailing_list_id) → directory_mailing_list(directory_id)
- contact_mailing_list_membership(contact_id) → directory_contact(directory_id)
- contact_mailing_list_membership(directory_id) → directory(id)
- contact_mailing_list_membership(owner_id) → user(id)
