# Marketo schema ERD

Table and field reference for the Fivetran Marketo connector.

## Table & Field Reference

### program_cost

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| program_id | Long | PK, FK |
| cost | Int |  |
| note | String |  |
| start_date | Instant |  |

### opportunity_membership

| Column | Type | Keys |
| --- | --- | --- |
| opportunity_id | Long | PK |
| id | Long | PK, FK |

### lead_describe

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| data_type | String |  |
| display_name | String |  |
| length | Int |  |
| restname | String |  |
| restread_only | Boolean |  |
| soapname | String |  |
| soapread_only | Boolean |  |

### form

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| program_id | Long | FK |
| button_label | String |  |
| button_location | Int |  |
| created_at | Instant |  |
| description | String |  |
| font_family | String |  |
| font_size | String |  |
| known_visitor_template | String |  |
| known_visitor_type | String |  |
| label_position | String |  |
| language | String |  |
| locale | String |  |
| name | String |  |
| progressive_profiling | Boolean |  |
| status | String |  |
| theme | String |  |
| updated_at | Instant |  |
| url | String |  |
| waiting_label | String |  |
| folder_** |  |  |

### lead

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |

### company

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| company | String |  |
| external_company_id | String |  |
| seq | Long |  |

### activity_type

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

### api_usage

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| count | Int |  |
| date | LocalDate |  |
| user_id | String |  |

### program_tag

| Column | Type | Keys |
| --- | --- | --- |
| program_id | Long | PK, FK |
| tag_type | String | PK, FK |
| tag_value | String |  |

### email_template_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| program_id | Long | FK |
| created_at | Instant |  |
| description | String |  |
| from_email | String |  |
| from_name | String |  |
| name | String |  |
| operational | Boolean |  |
| publish_to_msi | Boolean |  |
| reply_email | String |  |
| status | String |  |
| subject | String |  |
| template | Long |  |
| text_only | Boolean |  |
| url | String |  |
| version | Int |  |
| web_view | Boolean |  |
| workspace | String |  |
| folder_** |  |  |

### program_membership

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK, FK |
| program_id | Long | PK, FK |
| acquired_by | Boolean |  |
| is_exhausted | Boolean |  |
| membership_date | Instant |  |
| nurture_cadence | String |  |
| progression_status | String |  |
| reached_success | Boolean |  |
| reached_success_date | Instant |  |
| stream | String |  |

### list

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| program_name | String |  |
| updated_at | Instant |  |
| workspace_name | String |  |

### program_tag_type

| Column | Type | Keys |
| --- | --- | --- |
| tag_type | String | PK |
| applicable_program_types | String |  |
| required | Boolean |  |

### list_membership

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK, FK |
| list_id | Long | PK, FK |

### program

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| channel | String |  |
| created_at | Instant |  |
| description | String |  |
| end_date | Instant |  |
| name | String |  |
| sfdc_id | String |  |
| sfdc_name | String |  |
| start_date | Instant |  |
| status | String |  |
| type | String |  |
| updated_at | Instant |  |
| url | String |  |
| workspace | String |  |

### lead_company

| Column | Type | Keys |
| --- | --- | --- |
| company_id | Long | PK, FK |
| lead_id | Long | PK, FK |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| program_id | Long | FK |
| active | Boolean |  |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| program_name | String |  |
| type | String |  |
| updated_at | Instant |  |
| workspace_name | String |  |

## Relationships

- program_cost(program_id) → program(id)
- opportunity_membership(id) → lead(id)
- form(program_id) → program(id)
- program_tag(program_id) → program(id)
- program_tag(tag_type) → program_tag_type(tag_type)
- email_template_history(program_id) → program(id)
- program_membership(program_id) → program(id)
- program_membership(id) → lead(id)
- list_membership(list_id) → list(id)
- list_membership(id) → lead(id)
- lead_company(lead_id) → lead(id)
- lead_company(company_id) → company(id)
- campaign(program_id) → program(id)
