# X Organic schema ERD

Table and field reference for the Fivetran X Organic connector.

## Table & Field Reference

### tweet_user_mention

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| tweet_id | String | PK, FK |
| indices | Json |  |
| name | String |  |
| screen_name | String |  |

### tweet_hashtag

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| tweet_id | String | PK, FK |
| indices | Json |  |
| text | String |  |

### account_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| updated_at | Instant | PK |
| approval_status | String |  |
| business_id | String |  |
| business_name | String |  |
| created_at | Instant |  |
| deleted | Boolean |  |
| industry_type | String |  |
| name | String |  |
| salt | String |  |
| timezone | String |  |
| timezone_switch_at | Instant |  |

### tweet_symbols

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| tweet_id | String | PK, FK |
| indices | Json |  |
| text | String |  |

### tweet

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| user_id | Long | FK |
| card_uri | String |  |
| coordinates_coordinates | Json |  |
| coordinates_type | String |  |
| created_at | Instant |  |
| favorite_count | Long |  |
| favorited | Boolean |  |
| followers | Boolean |  |
| full_text | String |  |
| geo_coordinates | Json |  |
| geo_type | String |  |
| in_reply_to_screen_name | String |  |
| in_reply_to_status_id | String |  |
| in_reply_to_user_id | String |  |
| lang | String |  |
| media_key | String |  |
| name | String |  |
| retweet_count | Long |  |
| retweeted | Boolean |  |
| source | String |  |
| truncated | Boolean |  |
| tweet_type | String |  |

### card_component

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| card_id | String | PK, FK |
| label_type | String |  |
| label_value | String |  |
| media_key | String |  |
| title | String |  |
| type | String |  |
| destination_** |  |  |

### twitter_user_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| contributors_enabled | Boolean |  |
| created_at | Instant |  |
| default_profile | Boolean |  |
| default_profile_image | Boolean |  |
| description | String |  |
| favourites_count | Int |  |
| followers_count | Int |  |
| following | Boolean |  |
| friends_count | Int |  |
| geo_enabled | Boolean |  |
| is_translation_enabled | Boolean |  |
| is_translator | Boolean |  |
| lang | String |  |
| listed_count | Int |  |
| location | String |  |
| name | String |  |
| profile_background_image_url | String |  |
| profile_background_image_url_https | String |  |
| profile_background_tile | Boolean |  |
| profile_banner_url | String |  |
| profile_image_url | String |  |
| profile_image_url_https | String |  |
| profile_use_background_image | String |  |
| protected_user | Boolean |  |
| screen_name | String |  |
| statuses_count | Int |  |
| time_zone | String |  |
| url | String |  |
| utc_offset | Int |  |
| verified | Boolean |  |

### card_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| updated_at | Instant | PK |
| account_id | String | FK |
| app_cta | String |  |
| card_type | String |  |
| card_uri | String |  |
| content_duration_seconds | Long |  |
| country_code | String |  |
| created_at | Instant |  |
| deleted | Boolean |  |
| duration_in_minutes | Long |  |
| end_time | Instant |  |
| first_choice | String |  |
| first_cta | String |  |
| first_cta_tweet | String |  |
| first_cta_welcome_message_id | String |  |
| googleplay_app_id | String |  |
| image_display_height | String |  |
| image_display_width | String |  |
| media_key | String |  |
| media_url | String |  |
| name | String |  |
| poster_media_url | String |  |
| recipient_user_id | String |  |
| second_choice | String |  |
| start_time | Instant |  |
| thank_you_text | String |  |
| title | String |  |
| video_height | String |  |
| video_hls_url | String |  |
| video_owner_id | String |  |
| video_poster_height | String |  |
| video_poster_url | String |  |
| video_poster_width | String |  |
| video_url | String |  |
| video_width | String |  |
| website_dest_url | String |  |
| website_display_url | String |  |
| website_shortened_url | String |  |
| website_title | String |  |
| website_url | String |  |

### media_library

| Column | Type | Keys |
| --- | --- | --- |
| media_key | String | PK |
| created_at | Instant |  |
| deleted | Boolean |  |
| duration | Long |  |
| file_name | String |  |
| media_category | String |  |
| media_status | String |  |
| media_type | String |  |
| media_url | String |  |
| name | String |  |
| original_height | Long |  |
| original_width | Long |  |
| poster_media_key | String |  |
| poster_media_url | String |  |
| tweeted | Boolean |  |
| updated_at | Instant |  |

### tweet_media

| Column | Type | Keys |
| --- | --- | --- |
| media_id | String | PK |
| tweet_id | String | PK, FK |
| display_url | String |  |
| expanded_url | String |  |
| indices | Json |  |
| media_key | String |  |
| media_url | String |  |
| media_url_https | String |  |
| sizes | Json |  |
| type | String |  |
| url | String |  |

### scheduled_tweet_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| updated_at | Instant | PK |
| account_id | String | FK |
| tweet_id | String | FK |
| card_uri | String |  |
| completed_at | Instant |  |
| created_at | Instant |  |
| nullcast | Boolean |  |
| scheduled_at | Instant |  |
| scheduled_status | String |  |
| text | String |  |
| user_id | String |  |

### tweet_url

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| tweet_id | String | PK, FK |
| display_url | String |  |
| expanded_url | String |  |
| indices | Json |  |
| url | String |  |

## Relationships

- tweet_user_mention(tweet_id) → tweet(id)
- tweet_hashtag(tweet_id) → tweet(id)
- tweet_symbols(tweet_id) → tweet(id)
- tweet(account_id) → account_history(id)
- tweet(user_id) → twitter_user_history(id)
- card_component(card_id) → card_history(id)
- card_history(account_id) → account_history(id)
- tweet_media(tweet_id) → tweet(id)
- scheduled_tweet_history(tweet_id) → tweet(id)
- scheduled_tweet_history(account_id) → account_history(id)
- tweet_url(tweet_id) → tweet(id)
