# ChartMogul schema ERD

Table and field reference for the Fivetran ChartMogul connector.

## Table & Field Reference

### data_source

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| created_at | Unknown |  |
| name | String |  |
| status | String |  |
| systems | String |  |

### plan_group

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| name | String |  |
| plans_count | Long |  |

### plan

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| data_source_uuid | String | FK |
| external_id | String |  |
| interval_count | Long |  |
| interval_unit | String |  |
| name | String |  |

### mrr_churn_rate

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| mrr_churn_rate | Double |  |
| percentage_change | Double |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| currency | String |  |
| name | String |  |
| time_zone | String |  |
| week_start_on | String |  |

### annualized_run_rate

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| arr | Long |  |
| percentage_change | Double |  |

### customer_data_source_uuids

| Column | Type | Keys |
| --- | --- | --- |
| customer_uuid | String | PK, FK |
| data_source_uuid | String | PK, FK |

### customer_attribute_tag

| Column | Type | Keys |
| --- | --- | --- |
| tags | String | PK |
| customer_uuid | String | PK, FK |

### customer_external_ids

| Column | Type | Keys |
| --- | --- | --- |
| external_id | String | PK |
| customer_uuid | String | PK, FK |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| data_source_uuid | String | FK |
| address_address_zip | String |  |
| address_city | String |  |
| address_country | String |  |
| address_state | String |  |
| arr | Long |  |
| attributes_clearbit_company_category_industry | String |  |
| attributes_clearbit_company_category_industry_group | String |  |
| attributes_clearbit_company_category_sector | String |  |
| attributes_clearbit_company_category_sub_industry | String |  |
| attributes_clearbit_company_domain | String |  |
| attributes_clearbit_company_legal_name | String |  |
| attributes_clearbit_company_metrics_alexa_global_rank | Long |  |
| attributes_clearbit_company_metrics_employees | Long |  |
| attributes_clearbit_company_metrics_google_rank | Long |  |
| attributes_clearbit_company_metrics_market_cap | Unknown |  |
| attributes_clearbit_company_metrics_raised | Long |  |
| attributes_clearbit_company_name | String |  |
| attributes_clearbit_company_url | String |  |
| attributes_clearbit_person_employment_name | String |  |
| attributes_clearbit_person_name_full_name | String |  |
| attributes_stripe_coupon | Boolean |  |
| attributes_stripe_uid | Long |  |
| billing_system_type | String |  |
| billing_system_url | String |  |
| chartmogul_url | String |  |
| city | String |  |
| company | String |  |
| country | String |  |
| currency | String |  |
| currency_sign | String |  |
| customer_since | Unknown |  |
| email | String |  |
| external_id | String |  |
| free_trial_started_at | Unknown |  |
| id | Long |  |
| lead_created_at | Unknown |  |
| mrr | Long |  |
| name | String |  |
| state | String |  |
| status | String |  |
| zip | String |  |
| custom_** |  |  |

### customer_churn_rate

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| customer_churn_rate | Double |  |
| percentage_change | Double |  |

### plan_in_plan_group

| Column | Type | Keys |
| --- | --- | --- |
| plan_group_uuid | String | PK, FK |
| uuid | String | PK, FK |
| data_source_uuid | String | FK |
| external_id | String |  |
| interval_count | Long |  |
| interval_unit | String |  |
| name | String |  |

### customer_count

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| customers | Long |  |
| percentage_change | Double |  |

### customer_lifetime_value

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| ltv | Long |  |
| percentage_change | Double |  |

### cancellation_date

| Column | Type | Keys |
| --- | --- | --- |
| cancellation_date | Unknown | PK |
| subscription_uuid | String | PK, FK |

### subscription

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| customer_uuid | String | PK, FK |
| data_source_uuid | String | FK |
| plan_uuid | String | FK |
| external_id | String |  |
| subscription_set_external_id | String |  |

### average_sale_price

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| asp | Long |  |
| percentage_change | Double |  |

### invoice_line_item

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| data_source_uuid | Unknown | FK |
| invoice_uuid | String | FK |
| plan_uuid | String | FK |
| subscription_uuid | String | FK |
| account_code | Unknown |  |
| amount_in_cents | Long |  |
| discount_amount_in_cents | Long |  |
| discount_code | String |  |
| discount_description | String |  |
| event_order | Long |  |
| external_id | String |  |
| prorated | Boolean |  |
| proration_type | String |  |
| quantity | Long |  |
| service_period_end | Unknown |  |
| service_period_start | Unknown |  |
| subscription_external_id | String |  |
| subscription_set_external_id | String |  |
| tax_amount_in_cents | Long |  |
| transaction_fees_currency | String |  |
| transaction_fees_in_cents | Long |  |
| type | String |  |

### invoice_transaction

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| invoice_uuid | String | FK |
| amount_in_cent | Long |  |
| date | Unknown |  |
| external_id | String |  |
| result | String |  |
| transaction_fees_currency | String |  |
| transaction_fees_in_cent | Long |  |
| type | String |  |

### invoice

| Column | Type | Keys |
| --- | --- | --- |
| uuid | String | PK |
| customer_uuid | String | FK |
| currency | String |  |
| date | Unknown |  |
| due_date | Unknown |  |
| external_id | String |  |

### average_revenue_per_account

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| arpa | Long |  |
| percentage_change | Double |  |

### metric_subscription

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_uuid | String | FK |
| arr | Long |  |
| billing_cycle | String |  |
| billing_cycle_count | Long |  |
| currency | String |  |
| currency_sign | String |  |
| end_date | Unknown |  |
| external_id | String |  |
| mrr | Long |  |
| plan | String |  |
| quantity | Long |  |
| start_date | Unknown |  |
| status | String |  |

### monthly_recurring_revenue

| Column | Type | Keys |
| --- | --- | --- |
| date | Unknown | PK |
| mrr | Long |  |
| mrr_churn | Long |  |
| mrr_contraction | Long |  |
| mrr_expansion | Long |  |
| mrr_new_business | Long |  |
| mrr_reactivation | Long |  |
| percentage_change | Double |  |

### subscription_event

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| data_source_uuid | String | FK |
| amount_in_cents | Unknown |  |
| created_at | Unknown |  |
| currency | String |  |
| data_source_customer_external_id | String |  |
| effective_date | Unknown |  |
| errors | Json |  |
| event_date | Unknown |  |
| event_type | String |  |
| external_id | String |  |
| plan_external_id | String |  |
| quantity | Unknown |  |
| retracted_event_id | Unknown |  |
| subscription_external_id | String |  |
| subscription_set_external_id | String |  |
| tax_amount_in_cents | Long |  |
| updated_at | Unknown |  |

### activity

| Column | Type | Keys |
| --- | --- | --- |
| uuid | Unknown | PK |
| customer_uuid | Unknown | FK |
| active_subscription_quantity | Unknown |  |
| activity_mrr | Unknown |  |
| activity_mrr_movement | Unknown |  |
| billing_connector_uuid | Unknown |  |
| currency | Unknown |  |
| customer_external_id | Unknown |  |
| customer_name | Unknown |  |
| date | Unknown |  |
| description | Unknown |  |
| plan_external_id | Unknown |  |
| subscription_external_id | Unknown |  |
| type | Unknown |  |

## Relationships

- plan(data_source_uuid) → data_source(uuid)
- customer_data_source_uuids(data_source_uuid) → data_source(uuid)
- customer_data_source_uuids(customer_uuid) → customer(uuid)
- customer_attribute_tag(customer_uuid) → customer(uuid)
- customer_external_ids(customer_uuid) → customer(uuid)
- customer(data_source_uuid) → data_source(uuid)
- plan_in_plan_group(uuid) → plan(uuid)
- plan_in_plan_group(data_source_uuid) → data_source(uuid)
- plan_in_plan_group(plan_group_uuid) → plan_group(uuid)
- cancellation_date(subscription_uuid) → subscription(uuid)
- subscription(data_source_uuid) → data_source(uuid)
- subscription(plan_uuid) → plan(uuid)
- subscription(customer_uuid) → customer(uuid)
- invoice_line_item(subscription_uuid) → subscription(uuid)
- invoice_line_item(plan_uuid) → plan(uuid)
- invoice_line_item(invoice_uuid) → invoice(uuid)
- invoice_line_item(data_source_uuid) → data_source(uuid)
- invoice_transaction(invoice_uuid) → invoice(uuid)
- invoice(customer_uuid) → customer(uuid)
- metric_subscription(customer_uuid) → customer(uuid)
- subscription_event(data_source_uuid) → data_source(uuid)
- activity(customer_uuid) → customer(uuid)
