# Optimizely schema ERD

Table and field reference for the Fivetran Optimizely connector.

## Table & Field Reference

### decision

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| experiment_id | String | FK |
| variation_id | String | FK |
| account_id | String |  |
| client_engine | String |  |
| client_version | String |  |
| is_holdback | Boolean |  |
| process_timestamp | Instant |  |
| referer | String |  |
| revision | String |  |
| session_id | String |  |
| timestamp | Instant |  |
| user_agent | String |  |
| user_ip | String |  |
| visitor_id | String |  |

### page

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | FK |
| activation_code | String |  |
| activation_type | String |  |
| archived | Boolean |  |
| category | String |  |
| conditions | String |  |
| created | Instant |  |
| edit_url | String |  |
| key | String |  |
| last_modified | Instant |  |
| name | String |  |
| page_type | String |  |

### conversion_attribute

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| conversion_id | String | FK |
| id | String |  |
| name | String |  |
| type | String |  |
| value | String |  |

### campaign_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| project_id | Long | FK |
| url_targeting_page_id | Long | FK |
| created | Instant |  |
| earliest | Instant |  |
| holdback | Long |  |
| latest | Instant |  |
| name | String |  |
| status | String |  |
| url_targeting_activation_code | String |  |
| url_targeting_activation_type | String |  |
| url_targeting_conditions | String |  |
| url_targeting_edit_url | String |  |
| url_targeting_key | String |  |

### experiment_change_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |
| action_id | String | FK |
| allow_additional_redirect | Boolean |  |
| async | Boolean |  |
| destination | String |  |
| extension_id | String |  |
| name | String |  |
| operator | String |  |
| preserve_parameters | Boolean |  |
| selector | String |  |
| src | String |  |
| type | String |  |
| value | String |  |
| css_** |  |  |
| tag_attribute_** |  |  |

### audience

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| project_id | Long | FK |
| archived | Boolean |  |
| conditions | String |  |
| created | Instant |  |
| description | String |  |
| last_modified | Instant |  |
| name | String |  |
| segmentation | Boolean |  |

### campaign_page_history

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| campaign_last_modified | Instant | PK, FK |
| page_id | Long | PK, FK |

### event

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | PK, FK |
| page_id | Long | FK |
| archived | Boolean |  |
| category | String |  |
| created | Instant |  |
| description | String |  |
| event_type | String |  |
| is_classic | Boolean |  |
| is_editable | Boolean |  |
| key | String |  |
| name | String |  |

### experiment_change_dependency_history

| Column | Type | Keys |
| --- | --- | --- |
| dependent_change_id | String | PK |
| change_id | String | PK, FK |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |

### project

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| account_id | Long |  |
| confidence_threshold | Double |  |
| created | Instant |  |
| dcp_service_id | Long |  |
| description | String |  |
| is_classic | Boolean |  |
| last_modified | Instant |  |
| name | String |  |
| platform | String |  |
| socket_token | String |  |
| status | String |  |
| web_snippet_** |  |  |

### sdk

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| project_id | Long | PK, FK |
| sdk_name | String |  |

### campaign_change_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | Long | PK, FK |
| campaign_last_modified | Instant | PK, FK |
| async | Boolean |  |
| name | String |  |
| selector | String |  |
| src | String |  |
| type | String |  |
| value | String |  |

### conversion_tag

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| conversion_id | String | PK, FK |
| value | String |  |

### product_usage

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| plan_id | Long | PK, FK |
| allocation_term_in_months | Long |  |
| end_time | Instant |  |
| last_update_time | Instant |  |
| overage_cents_per_visitor | Long |  |
| product_name | String |  |
| start_time | Instant |  |
| usage | Long |  |
| usage_allowance | Long |  |

### extension

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | FK |
| archived | Boolean |  |
| created | Instant |  |
| description | String |  |
| edit_url | String |  |
| enabled | Boolean |  |
| last_modified | Instant |  |
| name | String |  |
| implementation_** |  |  |

### field

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| extension_id | Long | PK, FK |
| api_name | String |  |
| default_value | String |  |
| field_type | String |  |
| label | String |  |

### group_entity

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| group_id | Long | FK |
| kind | String |  |
| weight | Long |  |

### plan

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| plan_name | String |  |
| status | String |  |
| unit_of_measurement | String |  |

### attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | FK |
| archived | Boolean |  |
| condition_type | String |  |
| description | String |  |
| key | String |  |
| last_modified | Instant |  |
| name | String |  |

### campaign_metric_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| campaign_id | Long | PK, FK |
| campaign_last_modified | Instant | PK, FK |
| event_id | Long | FK |
| aggregator | String |  |
| field | String |  |
| scope | String |  |
| winning_direction | String |  |

### group

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | FK |
| archived | Boolean |  |
| created | Instant |  |
| description | String |  |
| last_modified | Instant |  |
| name | String |  |

### experiment_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| last_modified | Instant | PK |
| campaign_id | Long | FK |
| project_id | Long | FK |
| url_targeting_page_id | Long | FK |
| allocation_policy | String |  |
| audience_conditions | String |  |
| created | Instant |  |
| description | String |  |
| earliest | Instant |  |
| feature_key | String |  |
| feature_name | String |  |
| holdback | Long |  |
| key | String |  |
| latest | Instant |  |
| name | String |  |
| schedule_start_time | Instant |  |
| schedule_stop_time | Instant |  |
| schedule_time_zone | String |  |
| status | String |  |
| type | String |  |
| url_targeting_activation_code | String |  |
| url_targeting_activation_type | String |  |
| url_targeting_conditions | String |  |
| url_targeting_edit_url | String |  |
| url_targeting_key | String |  |

### experiment_variation_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |
| archived | Boolean |  |
| description | String |  |
| feature_enabled | Boolean |  |
| key | String |  |
| name | String |  |
| status | String |  |
| variable_values | String |  |
| weight | Long |  |

### campaign_change_dependency_history

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| campaign_last_modified | Instant | PK, FK |
| change_id | String | PK, FK |
| dependent_change_id | String | PK, FK |

### decision_attribute

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| decision_id | String | FK |
| id | String |  |
| name | String |  |
| type | String |  |
| value | String |  |

### experiment_metric_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |
| event_id | Long | FK |
| aggregator | String |  |
| field | String |  |
| scope | String |  |
| winning_direction | String |  |

### project_status

| Column | Type | Keys |
| --- | --- | --- |
| last_modified | Instant | PK |
| project_id | Long | PK, FK |
| description | String |  |
| platform | String |  |
| status | String |  |

### list_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| project_id | Long | FK |
| account_id | Long |  |
| archived | Boolean |  |
| created | Instant |  |
| description | String |  |
| key_field | String |  |
| last_modified | Instant |  |
| list_type | String |  |
| name | String |  |
| s_3_path | String |  |

### experiment_result_history

| Column | Type | Keys |
| --- | --- | --- |
| experiment_id | Long | PK |
| experiment_last_modified | Instant | PK |
| metric_name | String | PK |
| metric_variation_id | String | PK |
| confidence_threshold | Double |  |
| end_time | Instant |  |
| metric_aggregator | String |  |
| metric_conclusion_loser | String |  |
| metric_conclusion_winner | String |  |
| metric_event_id | String |  |
| metric_scope | String |  |
| metric_variation_is_baseline | Boolean |  |
| metric_variation_level | String |  |
| metric_variation_lift_confidence_interval | Json |  |
| metric_variation_lift_is_most_conclusive | Boolean |  |
| metric_variation_lift_is_significant | Boolean |  |
| metric_variation_lift_lift_status | String |  |
| metric_variation_lift_significance | Double |  |
| metric_variation_lift_value | Double |  |
| metric_variation_name | String |  |
| metric_variation_rate | Double |  |
| metric_variation_samples | Double |  |
| metric_variation_value | Double |  |
| metric_variation_variance | Double |  |
| metric_winning_direction | String |  |

### experiment_page_history

| Column | Type | Keys |
| --- | --- | --- |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |
| page_id | Long | PK, FK |

### conversion_experiment

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| conversion_id | String | PK, FK |
| campaign_id | String | FK |
| experiment_id | String | FK |
| variation_id | String | FK |
| is_holdback | Boolean |  |

### conversion

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String |  |
| client_engine | String |  |
| client_version | String |  |
| entity_id | String |  |
| event_name | String |  |
| event_type | String |  |
| process_timestamp | Instant |  |
| quantity | Long |  |
| referer | String |  |
| revenue | Long |  |
| revision | String |  |
| session_id | String |  |
| timestamp | Instant |  |
| user_agent | String |  |
| user_ip | String |  |
| value | Double |  |
| visitor_id | String |  |

### experiment_variation_action_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| experiment_id | Long | PK, FK |
| experiment_last_modified | Instant | PK, FK |
| variation_id | Long | PK, FK |
| page_id | Long | FK |
| share_link | String |  |

## Relationships

- decision(campaign_id) → campaign_history(id)
- decision(experiment_id) → experiment_history(id)
- decision(variation_id) → experiment_variation_history(experiment_id)
- page(project_id) → project(id)
- conversion_attribute(conversion_id) → conversion(id)
- campaign_history(project_id) → project(id)
- campaign_history(url_targeting_page_id) → page(id)
- experiment_change_history(experiment_id) → experiment_history(id)
- experiment_change_history(experiment_last_modified) → experiment_history(id)
- experiment_change_history(action_id) → experiment_variation_action_history(variation_id)
- audience(project_id) → project(id)
- campaign_page_history(campaign_id) → campaign_history(id)
- campaign_page_history(campaign_last_modified) → campaign_history(id)
- campaign_page_history(page_id) → page(id)
- event(project_id) → project(id)
- event(page_id) → page(id)
- experiment_change_dependency_history(change_id) → experiment_change_history(id)
- experiment_change_dependency_history(experiment_id) → experiment_history(id)
- experiment_change_dependency_history(experiment_last_modified) → experiment_history(id)
- sdk(project_id) → project(id)
- campaign_change_history(campaign_id) → campaign_history(id)
- campaign_change_history(campaign_last_modified) → campaign_history(id)
- conversion_tag(conversion_id) → conversion(id)
- product_usage(plan_id) → plan(id)
- extension(project_id) → project(id)
- field(extension_id) → extension(id)
- group_entity(group_id) → group(id)
- attribute(project_id) → project(id)
- campaign_metric_history(campaign_id) → campaign_history(id)
- campaign_metric_history(campaign_last_modified) → campaign_history(id)
- campaign_metric_history(event_id) → event(id)
- group(project_id) → project(id)
- experiment_history(campaign_id) → campaign_history(id)
- experiment_history(project_id) → project(id)
- experiment_history(url_targeting_page_id) → page(id)
- experiment_variation_history(experiment_id) → experiment_history(id)
- experiment_variation_history(experiment_last_modified) → experiment_history(id)
- campaign_change_dependency_history(change_id) → campaign_change_history(id)
- campaign_change_dependency_history(campaign_id) → campaign_history(id)
- campaign_change_dependency_history(campaign_last_modified) → campaign_history(id)
- campaign_change_dependency_history(dependent_change_id) → campaign_change_history(id)
- decision_attribute(decision_id) → decision(id)
- experiment_metric_history(experiment_id) → experiment_history(id)
- experiment_metric_history(experiment_last_modified) → experiment_history(id)
- experiment_metric_history(event_id) → event(id)
- project_status(project_id) → project(id)
- list_attribute(project_id) → project(id)
- experiment_page_history(experiment_id) → experiment_history(id)
- experiment_page_history(experiment_last_modified) → experiment_history(id)
- experiment_page_history(page_id) → page(id)
- conversion_experiment(conversion_id) → conversion(id)
- conversion_experiment(campaign_id) → campaign_history(id)
- conversion_experiment(experiment_id) → experiment_history(id)
- conversion_experiment(variation_id) → experiment_variation_history(experiment_id)
- experiment_variation_action_history(variation_id) → experiment_variation_history(experiment_id)
- experiment_variation_action_history(experiment_id) → experiment_history(id)
- experiment_variation_action_history(experiment_last_modified) → experiment_history(id)
- experiment_variation_action_history(page_id) → page(id)
