# Lattice schema ERD

Table and field reference for the Fivetran Lattice connector.

## Table & Field Reference

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| birth_date | Unknown |  |
| created_at | Unknown |  |
| department_id | String |  |
| email | String |  |
| external_user_id | String |  |
| gender | String |  |
| is_admin | Boolean |  |
| manager_id | String |  |
| name | String |  |
| preferred_name | String |  |
| start_date | Unknown |  |
| status | String |  |
| timezone | String |  |
| title | String |  |
| updated_at | Unknown |  |

### goal_user

| Column | Type | Keys |
| --- | --- | --- |
| goal_id | String | PK, FK |
| user_id | String | PK, FK |

### question_rating_scale

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| question_id | String | FK |
| descriptor | String |  |
| value | Double |  |

### question

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| body | String |  |
| choices | String |  |
| description | String |  |
| has_free_form_text | Boolean |  |

### user_direct_report

| Column | Type | Keys |
| --- | --- | --- |
| report_id | String | PK, FK |
| user_id | String | PK, FK |

### revision_question_rating_scale

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| revision_question_id | String | FK |
| descriptor | String |  |
| value | Double |  |

### revision_question

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| body | String |  |
| choices | String |  |
| description | String |  |
| has_free_form_text | Boolean |  |

### review_competency

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

### feedback_competency

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

### task

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| goal_id | String | FK |
| review_cycle_id | String | FK |
| user_id | String | FK |
| complete_requests_count | Long |  |
| due_at | Instant |  |
| object | String |  |
| total_requests_count | Long |  |
| type | String |  |

### review_cycle_reviewee

| Column | Type | Keys |
| --- | --- | --- |
| reviewee_id | String | PK, FK |
| review_cycle_id | String | FK |
| user_id | Unknown | FK |

### department

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| description | String |  |
| name | String |  |

### custom_attribute

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

### custom_attribute_value

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

### user_custom_attribute

| Column | Type | Keys |
| --- | --- | --- |
| custom_attribute_id | String | PK, FK |
| custom_attribute_value_id | String | PK, FK |
| custom_attribute_temp_users_id | Unknown | FK |
| user_id | String |  |

### child_goal

| Column | Type | Keys |
| --- | --- | --- |
| child_goal_id | String | PK, FK |
| goal_id | String | PK, FK |

### tag_goal

| Column | Type | Keys |
| --- | --- | --- |
| goal_id | String | PK, FK |
| tag_id | String | PK, FK |

### goal

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| department_id | String | FK |
| parent_goal_id | String | FK |
| amount_type | String |  |
| archived_at | Instant |  |
| completed_at | Instant |  |
| created_at | Instant |  |
| current_amount | Double |  |
| description | String |  |
| due_date | LocalDate |  |
| ending_amount | Double |  |
| goal_type | String |  |
| is_private | Boolean |  |
| last_updated_at | Instant |  |
| name | String |  |
| priority | String |  |
| published_at | Instant |  |
| start_date | LocalDate |  |
| starting_amount | Double |  |
| state | String |  |
| status | String |  |
| updated_at | Instant |  |

### update_response

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| update_id | String | FK |
| answer | String |  |
| question | String |  |

### updates

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| author_id | String | FK |
| manager_id | String | FK |
| created_at | Instant |  |
| is_public | Boolean |  |
| published_at | Instant |  |
| reviewed_at | Instant |  |
| sentiment_id | String |  |
| sentiment_rating | Double |  |

### review

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| competency_id | String | FK |
| goal_id | String | FK |
| question_id | String | FK |
| review_cycle_id | String | FK |
| reviewee_id | String | FK |
| reviewer_id | String | FK |
| revision_question_id | String | FK |
| calibrated_response_choices | String |  |
| calibrated_response_comment | String |  |
| calibrated_response_comment_sentiment | Double |  |
| calibrated_response_created_at | Instant |  |
| calibrated_response_rating | Double |  |
| calibrated_response_updated_at | Instant |  |
| declined_at | Instant |  |
| response_choices | String |  |
| response_comment | String |  |
| response_comment_sentiment | Double |  |
| response_created_at | Instant |  |
| response_rating | Double |  |
| response_updated_at | Instant |  |
| review_type | String |  |
| submitted_at | Instant |  |

### tags

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| name | String |  |
| updated_at | Instant |  |

### feedback_target

| Column | Type | Keys |
| --- | --- | --- |
| feedback_id | String | PK, FK |
| user_id | String | PK, FK |

### feedback_company

| Column | Type | Keys |
| --- | --- | --- |
| company_value_id | String | PK |
| feedback_id | String | PK, FK |

### feedback

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| author_id | String | FK |
| competency_id | String | FK |
| feedback_request_author_id | String | FK |
| feedback_request_competency_id | String | FK |
| feedback_request_subject_id | String | FK |
| body | String |  |
| created_at | Instant |  |
| feedback_request_body | String |  |
| feedback_request_created_at | Instant |  |
| feedback_request_fulfilled_at | Instant |  |
| is_public | Boolean |  |
| visibility | String |  |

### review_cycle

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creator_id | String | FK |
| created_at | Instant |  |
| name | String |  |
| peer_selection_started_at | Instant |  |
| reviews_ended_at | Instant |  |
| reviews_started_at | Instant |  |
| stage | String |  |
| updated_at | Instant |  |

## Relationships

- goal_user(goal_id) → goal(id)
- goal_user(user_id) → users(id)
- question_rating_scale(question_id) → question(id)
- user_direct_report(report_id) → users(id)
- user_direct_report(user_id) → users(id)
- revision_question_rating_scale(revision_question_id) → revision_question(id)
- task(goal_id) → goal(id)
- task(review_cycle_id) → review_cycle(id)
- task(user_id) → users(id)
- review_cycle_reviewee(reviewee_id) → users(id)
- review_cycle_reviewee(user_id) → users(id)
- review_cycle_reviewee(review_cycle_id) → review_cycle(id)
- user_custom_attribute(custom_attribute_id) → custom_attribute(id)
- user_custom_attribute(custom_attribute_value_id) → custom_attribute_value(id)
- user_custom_attribute(custom_attribute_temp_users_id) → users(id)
- child_goal(child_goal_id) → goal(id)
- child_goal(goal_id) → goal(id)
- tag_goal(tag_id) → tags(id)
- tag_goal(goal_id) → goal(id)
- goal(parent_goal_id) → goal(id)
- goal(department_id) → department(id)
- update_response(update_id) → updates(id)
- updates(author_id) → users(id)
- updates(manager_id) → users(id)
- review(question_id) → question(id)
- review(revision_question_id) → revision_question(id)
- review(reviewer_id) → users(id)
- review(reviewee_id) → review_cycle_reviewee(reviewee_id)
- review(goal_id) → goal(id)
- review(competency_id) → review_competency(id)
- review(review_cycle_id) → review_cycle(id)
- feedback_target(user_id) → users(id)
- feedback_target(feedback_id) → feedback(id)
- feedback_company(feedback_id) → feedback(id)
- feedback(author_id) → users(id)
- feedback(competency_id) → feedback_competency(id)
- feedback(feedback_request_author_id) → users(id)
- feedback(feedback_request_competency_id) → feedback_competency(id)
- feedback(feedback_request_subject_id) → users(id)
- review_cycle(creator_id) → users(id)
