Merged PR 4443: First version of the aggregated model for YTD/MTD Overview
# Description First version of the model int_ytd_mtd_aggregated_main_metrics_overview It aggregates data at the level of: * Date * Dimension * Dimension Value * Metric Name (or Id Metric) This computes differences and relative differences in: * current MTD vs previous month EOM * current MTD vs previous year MTD * current year YTD vs previous year YTD This is applied to 13 metrics, namely: * Total Revenue * Revenue Retained Post-Resolutions * Guest Revenue * Invoiced Operator Revenue * Invoiced APIs Revenue * Billable Bookings * Live Deals * New Deals * Churning Deals * Damage Waiver Payout Rate * Host Resolutions Payout Rate * Invoiced Operator Revenue per Billable Booking * Waiver Revenue per Billable Booking This still does not handle: * Comparison vs. targets (to be done later, need input) * Missing metrics on Onboarding MRR / Revenue Churn (to be done later) * Invoicing dependant data exclusion (to be done in reporting) # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. **At the moment I keep everything as views and seems ok. We'll see if this needs to be materialised as tables later on** # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #27609
This commit is contained in:
parent
073620bd3d
commit
7260368bad
2 changed files with 312 additions and 0 deletions
|
|
@ -2171,3 +2171,144 @@ models:
|
|||
- name: previous_month_eom_xero_waiver_paid_back_to_host_in_gbp
|
||||
data_type: numeric
|
||||
description: Waiver amounts paid back to hosts via Xero for the previous month, at the end of the month in GBP.
|
||||
|
||||
- name: int_ytd_mtd_aggregated_main_metrics_overview
|
||||
description: |
|
||||
This model provides a high-level overview of the main metrics for the month-to-date
|
||||
and financial year-to-date periods. Data is aggregated at metric level, and provides
|
||||
evolutions current month MTD vs. previous month EOM, current month MTD vs. previous
|
||||
year MTD and current YTD vs. previous YTD.
|
||||
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- dimension
|
||||
- dimension_value
|
||||
- metric_name
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- dimension
|
||||
- dimension_value
|
||||
- id_metric
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: The date for the month-to-date and year-to-date metrics.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: calendar_year
|
||||
data_type: integer
|
||||
description: The calendar year associated with the data.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: financial_year
|
||||
data_type: integer
|
||||
description: The financial year associated with the data.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: previous_year_date
|
||||
data_type: date
|
||||
description: |
|
||||
The equivalent date in the previous year. It can be null if the
|
||||
metric is not available in the previous year
|
||||
|
||||
- name: id_metric
|
||||
data_type: integer
|
||||
description: |
|
||||
Unique ID for this metric. It is preferable to use this ID when
|
||||
building a report to ensure changes in the metric name do not
|
||||
affect the report.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: metric_name
|
||||
data_type: string
|
||||
description: |
|
||||
Name of the metric. It is preferable to use the ID of the metric
|
||||
when building a report to ensure changes in the metric name do not
|
||||
affect the report.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: requires_invoicing_data
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to indicate if the metric requires invoicing data to be calculated.
|
||||
This will limit the display for reporting purposes.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: current_month_mtd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Value of the metric for the current month MTD.
|
||||
|
||||
- name: previous_month_eom
|
||||
data_type: numeric
|
||||
description: |
|
||||
Value of the metric for the previous month EOM.
|
||||
|
||||
- name: previous_year_mtd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Value of the metric for the previous year MTD.
|
||||
|
||||
- name: current_year_ytd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Value of the metric for the current year YTD.
|
||||
|
||||
- name: previous_year_ytd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Value of the metric for the previous year YTD.
|
||||
|
||||
- name: diff_current_month_mtd_vs_previous_month_eom
|
||||
data_type: numeric
|
||||
description: |
|
||||
Difference between the current month MTD and the previous month EOM.
|
||||
|
||||
- name: diff_current_month_mtd_vs_previous_year_mtd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Difference between the current month MTD and the previous year MTD.
|
||||
|
||||
- name: diff_current_ytd_vs_previous_ytd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Difference between the current year YTD and the previous year YTD.
|
||||
|
||||
- name: rel_diff_current_month_mtd_vs_previous_month_eom
|
||||
data_type: numeric
|
||||
description: |
|
||||
Relative difference between the current month MTD and the previous month EOM.
|
||||
|
||||
- name: rel_diff_current_month_mtd_vs_previous_year_mtd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Relative difference between the current month MTD and the previous year MTD.
|
||||
|
||||
- name: rel_diff_current_ytd_vs_previous_ytd
|
||||
data_type: numeric
|
||||
description: |
|
||||
Relative difference between the current year YTD and the previous year YTD.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue