Commit graph

1042 commits

Author SHA1 Message Date
Joaquin Ossa
396d19b549 changed exclusion rule for metrics depending on invoicing 2025-01-30 15:43:53 +01:00
Joaquin Ossa
142b5a526f MRR change 2025-01-30 15:15:34 +01:00
Oriol Roqué Paniagua
a208541e04 Merged PR 4224: Rework accounting aggregations for Financial Reporting
# Description

This PR reworks the Financial Aggregations based on Nathan's requirements, that can be found in an Excel attached to the board ticket.

Main changes:
- Accounting seed now contains 3 financial aggregations as requested by Finance
- These 3 aggregations are propagated up to reporting. This effectively breaks a WIP report - but it's WIP, not in prod, so it's not a big deal

# 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.

# Other

- [X] Check if a full-refresh is required after this PR is merged. **Need to create the seed manually**

Related work items: #26618
2025-01-30 10:28:49 +00:00
Joaquin Ossa
fe317ac17a Cleaned first time booked for deals 2025-01-30 10:16:29 +01:00
Joaquin Ossa
63b1eac81f Addressed comments 2025-01-29 17:06:37 +01:00
Joaquin Ossa
a48f6d0f59 Fixed dumb auto formatting 2025-01-29 17:06:37 +01:00
Joaquin Ossa
c0da375223 Update 2025-01-29 17:06:37 +01:00
Joaquin Ossa
26898322e7 wip fixing deals from hubspot 2025-01-29 17:06:37 +01:00
Joaquin Ossa
cf024f7b71 wip 2025-01-29 17:06:37 +01:00
Joaquin Ossa
cea7cdb34d Removed first_time_booked_deals metric 2025-01-29 17:06:37 +01:00
Joaquin Ossa
88e86ea9ed Added schema 2025-01-29 17:06:37 +01:00
Joaquin Ossa
8bd5851235 created new model to get all mrr metrics 2025-01-29 17:06:37 +01:00
Joaquin Ossa
39de8617b7 New expected MRR metric 2025-01-29 17:06:37 +01:00
Oriol Roqué Paniagua
6dcfe03b30 Merged PR 4215: Fixes
# Description

Small PR to fix stuff

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Fixes

Related work items: #27096
2025-01-29 12:46:53 +00:00
Joaquin Ossa
d7f454b326 Removed deal lifecycle First-Booked 2025-01-27 14:55:53 +01:00
Joaquin Ossa
5186cd2cac Renamed Onboarding MRR per New Account 2025-01-27 12:40:52 +01:00
Joaquin Ossa
e63a093991 Added ratios to deal models 2025-01-24 14:47:41 +01:00
Joaquin Ossa
720185f235 Fixed macro 2025-01-24 14:17:29 +01:00
Joaquin Ossa
f7bacc2310 changed names 2025-01-24 08:30:05 +01:00
Joaquin Ossa
49a10fe249 New KPI rates for Main KPIs 2025-01-23 17:14:36 +01:00
Joaquin Ossa
463de78b1e update exposures 2025-01-23 08:50:13 +01:00
Oriol Roqué Paniagua
437460065e Merged PR 4138: Adds Account Code Name in reporting
# Description

Adds account code name in reporting for sales denom mart in xero

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26618
2025-01-21 16:37:16 +00:00
Oriol Roqué Paniagua
ddc806583c Merged PR 4130: Propagate aggregations to xero sales reporting
# Description

Propagates the xero aggregations to the reporting model of xero__sales_denom_mart

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26618
2025-01-21 13:22:36 +00:00
Joaquin Ossa
f8cf824c06 cih monthly fee to reporting 2025-01-21 12:37:50 +01:00
Oriol Roqué Paniagua
5394066959 Merged PR 4124: Adds dedicated start date for KPIs
# Description

This is a extremely simple but rather important PR.
It just sets the cutoff for KPIs reporting to April 2022. This affects 1) Main KPIs, 2) Guest KPIs and 3) Account Managers report

Motivation behind this is to have accurate data. Early 2022 might still be shitty, but at least we have a source of truth to compare against (on revenue side, finance P&L)

I set a dedicated variable because currency rates is reading from the same start date, and I intend only to modify KPIs cutoff.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [NA] The edited models are sufficiently documented.
- [NA] The edited models contain PK tests, and I've ran and passed them.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged. **I need to manually run a full-refresh on daily listing segmentation that is incremental**

Adds dedicated start date for KPIs

Related work items: #26712
2025-01-21 11:18:16 +00:00
Joaquin Ossa
6141af1eff Merged PR 4076: CIH fees
# Description

Added booking fees for CIH requests and new model of aggregated monthly fee per user

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26158
2025-01-21 09:27:21 +00:00
Joaquin Ossa
89f7db1997 back to created date 2025-01-21 10:18:46 +01:00
Joaquin Ossa
e71cde0d63 PMS in new dash reporting 2025-01-21 10:12:46 +01:00
Joaquin Ossa
90967fd34e Merged PR 4117: Added PMS info
# Description

Added PMS info to `int_core__user_host` and propagated data to where needed

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Added PMS info

Related work items: #26589
2025-01-21 08:07:22 +00:00
Oriol Roqué Paniagua
1865bafd19 Merged PR 4118: New Dash services Invoiced Revenue
# Description

Adds new metrics on Revenue for New Dash services:
    invoiced_revenue.xero_basic_protection_net_fees_in_gbp,
    invoiced_revenue.xero_waiver_pro_net_fees_in_gbp,
    invoiced_revenue.xero_id_verification_net_fees_in_gbp,
    invoiced_revenue.xero_protection_plus_net_fees_in_gbp,
    invoiced_revenue.xero_screening_plus_net_fees_in_gbp,
    invoiced_revenue.xero_sex_offenders_check_net_fees_in_gbp,
    invoiced_revenue.xero_protection_pro_net_fees_in_gbp

Note that it does not add Basic Screening. This is because so far this is a free service, even though the kpis models already consider such a possibility.

First data appears for December so this will be available starting 1st February

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

New Dash services Invoiced Revenue

Related work items: #26680
2025-01-20 16:23:20 +00:00
Joaquin Ossa
e007b85d87 Addressed comments 2025-01-20 17:18:39 +01:00
Joaquin Ossa
15e0993b36 changed exchange rate date to first of the next month from created date 2025-01-20 16:51:57 +01:00
Joaquin Ossa
8898a2d150 modified host/deal logic 2025-01-20 16:35:43 +01:00
Joaquin Ossa
1a692a044b fixed join 2025-01-20 15:23:53 +01:00
Oriol Roqué Paniagua
d12a7233c9 Merged PR 4104: Refactor Invoiced Revenue from Account Code + New Revenue Streams
# Description

Changes:
* Major changes on int_kpis__metric_daily_invoiced_revenue. Now data is retrieved from the account codes, following the previous analysis. This actually reads from a work done on Accounting Codes, with the default aggregations set as a seed. I've also included here new revenue streams for new dash, and the split of guesty fees between resolutions and real API fees. However, New Dash services are still not visible as final metrics. I'll do this separately.
* Propagation of changes in intermediate models. This will affect currently displayed metrics, but not show any new metric.

Since this is quite dense, let's discuss.

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26531
2025-01-20 14:18:05 +00:00
Joaquin Ossa
31e4feb593 Added fees in gbp 2025-01-20 15:14:57 +01:00
Joaquin Ossa
5c71791f10 Added PMS info 2025-01-20 14:26:37 +01:00
Oriol Roqué Paniagua
151bb46182 Merged PR 4107: First version of accounting aggregations
# Description

Creates a seed to define how to aggregate the different revenue/cost sources, at account code level.

This is propagated to the sales denom mart in intermediate.

This is not complete, but should be a good starting point and it enables moving forward with a couple of tickets regarding KPIs revenue refactor and further Finance reporting, by just keeping a single source of truth. It's mostly focusing on the Don't Repeat Yourself

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

First version of accounting aggregations - not complete

Related work items: #26618
2025-01-19 12:20:19 +00:00
Oriol Roqué Paniagua
06bdb81cfe Merged PR 4106: Avoids duplicates in athena verification with fees after price changes
# Description

There was some duplicated records that effectively raised alarms in data tests.

The fix is simple:
* Ensure that is using the timestamp field, rather than the date of checkout.
* This was not enough because in some cases the timestamp is exactly at midnight. So I changed the between to an explicit logic - start condition is inclusive, while end condition is exclusive.

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26622
2025-01-19 10:07:39 +00:00
Oriol Roqué Paniagua
873402fd8e Merged PR 4105: Fixes exclusion of MRR after name change
# Description

After the name change of the metric, the exclusion in reporting for the ongoing month and previous month is not working for the new MRR metric. This PR aims to fix it.

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Fixes exclusion of MRR after name change

Related work items: #26621
2025-01-19 09:37:07 +00:00
Pablo Martín
3f3b99cdf6 Merged PR 4102: Athena price update
# Description

This PR handles the new price set for Athena in Nov.24, as indicated by Nila from Finance (see more detailes in linked story). Price has gone from 2.0GBP to 2.1GBP.

Note that I have manually checked the correctness of the figures, I'm highly confident on the quality of the PR. All figures stay the same in old and new version of to the cutoff date (`2024-11-01T00:00:00Z`). Then, after that date, the 10 cents extra show appropiately.

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26475
2025-01-17 16:34:29 +00:00
Joaquin Ossa
51326865d8 Small name change 2025-01-17 11:45:48 +01:00
Joaquin Ossa
394d2e7672 excluding current and previous month for expected mrr 2025-01-17 08:29:58 +01:00
Joaquin Ossa
6d5b15f062 Added expected_mrr to int_mtd_aggregated_metrics 2025-01-16 15:32:32 +01:00
Joaquin Ossa
bf0cddcb4d wip2 2025-01-16 14:46:20 +01:00
Joaquin Ossa
7213a34d1c wip 2025-01-16 14:46:20 +01:00
Joaquin Ossa
f3201b3c77 changed to cube instead of rollup 2025-01-16 14:21:00 +01:00
Joaquin Ossa
e98b60f335 Merged PR 4050: Onboarding MRR Model
# Description

Creates onboarding MRR Model
It contains the expected MRR by country and by number of listings per deal (according to HubSpot data) per date. The date is the last day of the month where it considers data from the previous 12 months up to date.

# 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.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26223
2025-01-16 11:09:58 +00:00
Joaquin Ossa
095bfb8ab1 removed UNSET billing_countries 2025-01-16 11:35:39 +01:00
Oriol Roqué Paniagua
6aafd605b2 Merged PR 4077: Propagate account code and account name for Xero - reporting models
# Description

Propagate account code and account name for Xero reporting models, specifically:
* xero__credit_note_line_items
* xero__invoice_line_items
* xero__sales_denom_mart

These are already available in intermediate models. This is independent from KPIs, but I feel like we should propagate this to reporting since are useful fields for accounting purposes. Happy to discuss if this needs to be reflected in PBI.

# 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.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26531
2025-01-16 10:04:41 +00:00