# Marin Software schema ERD

Table and field reference for the Fivetran Marin Software connector.

## Table & Field Reference

### group_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| campaign_id | Long | FK |
| content_bid | Float |  |
| name | String |  |
| pub_id | Long |  |
| search_bid | Float |  |
| status | String |  |

### creative_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| group_id | Long | FK |
| description_1 | String |  |
| description_2 | String |  |
| display_url | String |  |
| display_url_nav_1 | String |  |
| display_url_nav_2 | String |  |
| headline | String |  |
| headline_2 | String |  |
| pub_id | Long |  |
| status | String |  |
| url | String |  |

### publisher_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| account_id | Long | FK |
| name | String |  |
| original_currency | String |  |
| type | Int |  |

### product_target_fact

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| conversion_event_id | Long | PK, FK |
| group_id | Long | PK, FK |
| product_target_id | Long | PK, FK |
| avg_cpc | Float |  |
| avg_pos | Float |  |
| clicks | Int |  |
| conversions | Int |  |
| impressions | Int |  |
| last_modified | Instant |  |
| publisher_cost | Float |  |
| revenue | Float |  |

### campaign_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| publisher_id | Long | FK |
| budget | Float |  |
| end_date | LocalDate |  |
| name | String |  |
| pub_id | Long |  |
| start_date | LocalDate |  |
| status | String |  |

### creative_fact

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| conversion_event_id | Long | PK, FK |
| creative_id | Long | PK, FK |
| group_id | Long | PK, FK |
| avg_cpc | Float |  |
| avg_pos | Float |  |
| clicks | Int |  |
| conversions | Int |  |
| impressions | Int |  |
| last_modified | Instant |  |
| publisher_cost | Float |  |
| revenue | Float |  |

### group_device_fact

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| id | Long | PK |
| conversion_event_id | Long | PK, FK |
| group_id | Long | PK, FK |
| avg_cpc | Float |  |
| avg_pos | Float |  |
| clicks | Int |  |
| conversions | Int |  |
| impressions | Int |  |
| last_modified | Instant |  |
| potential_impressions | Float |  |
| publisher_cost | Float |  |
| revenue | Float |  |

### product_target_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| group_id | Long | FK |
| name | String |  |
| pub_id | Long |  |
| status | String |  |
| url | String |  |

### keyword_fact

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| conversion_event_id | Long | PK, FK |
| group_id | Long | PK, FK |
| keyword_id | Long | PK, FK |
| avg_cpc | Float |  |
| avg_pos | Float |  |
| clicks | Int |  |
| conversions | Int |  |
| impressions | Int |  |
| impressions_on_absolute_top | Int |  |
| impressions_on_top | Int |  |
| last_modified | Instant |  |
| potential_impressions | Float |  |
| potential_impressions_on_absolute_top | Int |  |
| potential_impressions_on_top | Int |  |
| publisher_cost | Float |  |
| revenue | Float |  |
| search_bid | Float |  |

### keyword_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| group_id | Long | FK |
| keyword | String |  |
| match_type | String |  |
| min_bid | Float |  |
| pub_id | Long |  |
| quality_score | Long |  |
| status | String |  |
| url | String |  |

### conversion_event

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| abbreviation | String |  |
| aggregate_to_conversions | Long |  |
| aggregate_to_revenue | Long |  |
| alias_id | String |  |
| attribution_date | String |  |
| last_modified | Instant |  |
| name | String |  |

### account_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| creation_date | LocalDate |  |
| currency | String |  |
| name | String |  |
| timezone | String |  |
| tracking_id | String |  |

### placement_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| group_id | Long | FK |
| keyword_url | String |  |
| placement | String |  |
| pub_id | Long |  |
| status | String |  |

### placement_fact

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| conversion_event_id | Long | PK, FK |
| group_id | Long | PK, FK |
| placement_id | Long | PK, FK |
| avg_cpc | Float |  |
| avg_pos | Float |  |
| clicks | Int |  |
| conversions | Int |  |
| impressions | Int |  |
| last_modified | Instant |  |
| publisher_cost | Float |  |
| revenue | Float |  |

## Relationships

- group_history(campaign_id) → campaign_history(last_modified)
- creative_history(group_id) → group_history(last_modified)
- publisher_history(account_id) → account_history(last_modified)
- product_target_fact(product_target_id) → product_target_history(last_modified)
- product_target_fact(group_id) → group_history(last_modified)
- product_target_fact(conversion_event_id) → conversion_event(id)
- campaign_history(publisher_id) → publisher_history(last_modified)
- creative_fact(creative_id) → creative_history(last_modified)
- creative_fact(group_id) → group_history(last_modified)
- creative_fact(conversion_event_id) → conversion_event(id)
- group_device_fact(group_id) → group_history(last_modified)
- group_device_fact(conversion_event_id) → conversion_event(id)
- product_target_history(group_id) → group_history(last_modified)
- keyword_fact(keyword_id) → keyword_history(last_modified)
- keyword_fact(group_id) → group_history(last_modified)
- keyword_fact(conversion_event_id) → conversion_event(id)
- keyword_history(group_id) → group_history(last_modified)
- placement_history(group_id) → group_history(last_modified)
- placement_fact(placement_id) → placement_history(last_modified)
- placement_fact(group_id) → group_history(last_modified)
- placement_fact(conversion_event_id) → conversion_event(id)
