# Reddit Ads schema ERD

Table and field reference for the Fivetran Reddit Ads connector.

## Table & Field Reference

### pixel_partner_reference

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| account_id | String | PK, FK |
| value | String |  |

### pixel_audience_targeting

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| custom_audience_id | String | PK, FK |
| value | String |  |

### targeting_community

| Column | Type | Keys |
| --- | --- | --- |
| ad_group_id | String | PK, FK |
| community_id | String | PK, FK |
| excluded | Boolean |  |

### click_url_query_parameter

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| ad_id | String | PK, FK |
| name | String |  |
| value | String |  |

### targeting_placement

| Column | Type | Keys |
| --- | --- | --- |
| location | String | PK |
| ad_group_id | String | PK, FK |

### time_zone

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| code | String |  |
| dst_offset | Long |  |
| is_dst_active | Boolean |  |
| name | String |  |
| offset | Long |  |

### pixel_audience_custom_targeting

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| custom_audience_id | String | PK, FK |
| value | String |  |

### targeting_keyword

| Column | Type | Keys |
| --- | --- | --- |
| keyword | String | PK |
| ad_group_id | String | PK, FK |
| excluded | Boolean |  |

### schedule

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| ad_group_id | String | FK |
| end_day | Long |  |
| end_hour | Long |  |
| start_day | Long |  |
| start_hour | Long |  |

### targeting_interest

| Column | Type | Keys |
| --- | --- | --- |
| ad_group_id | String | PK, FK |
| interest_id | String | PK, FK |
| excluded | Boolean |  |

### ad

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| ad_group_id | String | FK |
| campaign_id | String | FK |
| click_url | String |  |
| configured_status | String |  |
| effective_status | String |  |
| name | String |  |
| post_id | String |  |
| post_url | String |  |
| preview_expiry | String |  |
| preview_url | String |  |
| rejection_reason | String |  |

### community

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| daily_impressions | Long |  |
| description | String |  |
| icon_url | String |  |
| name | String |  |
| subscriber_count | Long |  |

### ad_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | PK, FK |
| campaign_id | String | FK |
| bid_strategy | String |  |
| bid_value | Long |  |
| configured_status | String |  |
| effective_status | String |  |
| end_time | Instant |  |
| expand_targeting | Boolean |  |
| goal_type | String |  |
| goal_value | Long |  |
| is_processing | Boolean |  |
| name | String |  |
| optimization_goal | String |  |
| start_time | Instant |  |

### engagement_audience_campaign

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| custom_audience_id | String | PK, FK |

### targeting_device

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| ad_group_id | String | FK |
| label_map | Json |  |
| max_version | String |  |
| min_version | String |  |
| os | String |  |
| type | String |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| configured_status | String |  |
| effective_status | String |  |
| funding_instrument_id | String |  |
| is_processing | Boolean |  |
| name | String |  |
| objective | String |  |

### targeting_custom_audience

| Column | Type | Keys |
| --- | --- | --- |
| ad_group_id | String | PK, FK |
| custom_audience_id | String | PK, FK |
| excluded | Boolean |  |

### business_account

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| business_id | String | FK |
| time_zone_id | String | FK |
| admin_approval | String |  |
| app_attribution_type | String |  |
| app_click_attribution_window | String |  |
| app_view_attribution_window | String |  |
| attribution_type | String |  |
| click_attribution_window | String |  |
| created_at | Instant |  |
| currency | String |  |
| modified_at | Instant |  |
| name | String |  |
| primary_contact_member_id | String |  |
| spend_cap_type | String |  |
| suspension_reason | String |  |
| type | String |  |
| view_attribution_window | String |  |

### custom_audience_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| created_at | Instant |  |
| customer_list_config_external_id | String |  |
| customer_list_config_origin | String |  |
| engagement_audience_configlookback_window_days | Long |  |
| lookalike_configsource_audience_id | String |  |
| name | String |  |
| pixel_audience_configlookback_window_days | String |  |
| size_range_lower | Long |  |
| size_range_upper | Long |  |
| status | String |  |
| type | String |  |
| updated_at | Instant |  |

### geolocation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| country | String |  |
| dma | Long |  |
| name | String |  |
| postal_code | String |  |
| region | String |  |

### engagement_audience_tracking_type

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| custom_audience_id | String | PK, FK |
| value | String |  |

### business

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| agency_affiliated | Boolean |  |
| country | String |  |
| created_at | Instant |  |
| creator_id | String |  |
| industry | String |  |
| modified_at | Instant |  |
| name | String |  |
| phone | String |  |
| website_url | String |  |

### targeting_geolocation

| Column | Type | Keys |
| --- | --- | --- |
| ad_group_id | String | PK, FK |
| geolocation_id | String | PK, FK |
| excluded | Boolean |  |

### event_tracker

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| ad_id | String | PK, FK |
| type | String |  |
| url | String |  |

### interest

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

## Relationships

- pixel_partner_reference(account_id) → business_account(id)
- pixel_audience_targeting(custom_audience_id) → custom_audience_history(id)
- targeting_community(ad_group_id) → ad_group(id)
- targeting_community(community_id) → community(id)
- click_url_query_parameter(ad_id) → ad(id)
- targeting_placement(ad_group_id) → ad_group(id)
- pixel_audience_custom_targeting(custom_audience_id) → custom_audience_history(id)
- targeting_keyword(ad_group_id) → ad_group(id)
- schedule(ad_group_id) → ad_group(id)
- targeting_interest(ad_group_id) → ad_group(id)
- targeting_interest(interest_id) → interest(id)
- ad(account_id) → business_account(id)
- ad(ad_group_id) → ad_group(id)
- ad(campaign_id) → campaign(id)
- ad_group(account_id) → business_account(id)
- ad_group(campaign_id) → campaign(id)
- engagement_audience_campaign(custom_audience_id) → custom_audience_history(id)
- engagement_audience_campaign(campaign_id) → campaign(id)
- targeting_device(ad_group_id) → ad_group(id)
- campaign(account_id) → business_account(id)
- targeting_custom_audience(ad_group_id) → ad_group(id)
- targeting_custom_audience(custom_audience_id) → custom_audience_history(id)
- business_account(business_id) → business(id)
- business_account(time_zone_id) → time_zone(id)
- custom_audience_history(account_id) → business_account(id)
- engagement_audience_tracking_type(custom_audience_id) → custom_audience_history(id)
- targeting_geolocation(ad_group_id) → ad_group(id)
- targeting_geolocation(geolocation_id) → geolocation(id)
- event_tracker(ad_id) → ad(id)
