Commit graph

1398 commits

Author SHA1 Message Date
Joaquin
c33253b10a addressed comments 2025-03-14 11:19:22 +01:00
Joaquin
525720ea0a Changes in deals lifecycle 2025-03-14 10:39:01 +01:00
Joaquin
e0d18acf8e Churn update 2025-03-14 10:12:54 +01:00
Joaquin
e827c0f9d5 Updated schema 2025-03-13 17:31:15 +01:00
Joaquin
a2b3b7fa6b Updated schema 2025-03-13 17:29:24 +01:00
Joaquin
d6426b0066 change in new deals 2025-03-13 17:19:34 +01:00
Joaquin
1ced79ca0a commit wip 2025-03-13 15:48:15 +01:00
Oriol Roqué Paniagua
bf1e125856 Merged PR 4687: Bugfix - Removal of SH fields that no longer exist
# Description

After the sync this morning in Core in Airbyte, we have some issues in SH User. This attempts to remove no longer existing fields, namely:
- id_airbnb
- airbnb_url
- platform_comms_recipient

# 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.
- [ ] 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: #28502
2025-03-13 12:25:13 +00:00
Oriol Roqué Paniagua
eb26252784 Merged PR 4686: Guest Products - Sync Guest Products
# Description

Adds the remaining Guest Products tables to staging

# 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: #28490
2025-03-13 11:53:04 +00:00
Oriol Roqué Paniagua
7ef460a59e Merged PR 4685: Guest Products - sync core tables
# Description

Adds `VerificationRequestGuestProductToPayment` and `VerificationRequestToGuestProduct` to staging.

Note these tables are empty thus it's possible that some tests might need to be adapted in the future.

I also already added the configuration for sync_guest_product sources.

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

Guest Products - sync core tables

Related work items: #28490
2025-03-13 09:27:02 +00:00
Oriol Roqué Paniagua
9ca9c827fe Merged PR 4665: Projected Bookings to the end of the current month
# Description

Computes projected Bookings to the end of the current month per dimension and dimension value

KPIs changes:
* Adds a int_kpis__agg_daily_created_bookings model. This is a standard KPIs model that computes created bookings at a daily level per dimension and dimension value.

Projected KPIs (NEW):
* Adds a new folder named projected within KPIs. This includes a simple Readme.
* Adds a default dimension dates model that ranges from the past 3 complete months to the end of the current month, that is in the future.
* Adds 2 projected models for created bookings: The daily one, that handles the logic of the projection (same month + last 7 days) and the monthly one, that retrieves the end of month projected value as well as some indicators of how good or bad this was for previous months.

How good is the projection at 11th of March (so 10 days in the month)?

`select * from intermediate.int_kpis_projected__agg_monthly_created_bookings order by actual_created_bookings desc`

![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/4665/attachments/image.png)

# 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: #28251
2025-03-11 14:34:30 +00:00
Joaquin Ossa
459b1b3833 Updated exposures 2025-03-10 10:57:21 +01:00
Joaquin Ossa
f8362c4a71 addressed comments 2025-03-07 11:32:09 +01:00
Joaquin Ossa
2d4cded48c Addressed comments and included changes in reporting 2025-03-07 11:13:03 +01:00
Joaquin Ossa
2461286c9c Updated model 2025-03-07 10:17:11 +01:00
Joaquin Ossa
0536cfb0e2 Fixing formatting 2025-03-06 17:19:15 +01:00
Joaquin Ossa
f8b551a75c Updated existing model with some new fields for churning report 2025-03-06 17:12:32 +01:00
Joaquin Ossa
24d13185eb Added year and month 2025-03-06 15:02:44 +01:00
Joaquin Ossa
1245a88867 New churned deals model 2025-03-06 14:57:23 +01:00
Joaquin Ossa
089a1c37bd commit wip 2025-03-06 11:02:46 +01:00
Joaquin Ossa
d065d4beb6 New Dash bug fix 2025-03-06 08:16:40 +01:00
Oriol Roqué Paniagua
39fc6a7d13 Merged PR 4618: Bugfix - Ensure the PMS is active
# Description

Very silly mistake - affects many reports!

@<Joaquin Ossa> let me know if there's other use cases. I believe that's all of the computations, but you have this more fresh than me.

# 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.
- [ ] 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: #28196
2025-03-05 14:57:57 +00:00
Oriol Roqué Paniagua
5ddbe5d5af Merged PR 4616: Adds first day month for reporting purposes
# Description

Just adds the first day of the month for AM models. The problem is that the display of the graph and the value shown are misleading. This aims to fix it. I hate 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.
- [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.

Adds first day month for reporting purposes

Related work items: #28181
2025-03-05 14:31:36 +00:00
Oriol Roqué Paniagua
5d6e860e2b Merged PR 4596: Propagates Client Type to KPIs by Deal and AM models
# Description

Propagates Client Type to KPIs by Deal and AM models. This is just a distinction between Platform and APIs.

# 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: #28181
2025-03-05 13:02:07 +00:00
Oriol Roqué Paniagua
1a4a9fac37 Merged PR 4578: Propagates the month attribution from invoicing data
# Description

Following the changes of the month attribution on invoicing data depending if the document is posted on Xero or in Hyperline, this PR ensures that the 2 affected areas capture this change.

This means:
* Xero - Sales Monthly Trends
* KPIs - Invoiced Revenue

# 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: #28158
2025-03-04 14:13:53 +00:00
Oriol Roqué Paniagua
3f1e2ea1d9 Merged PR 4572: Applies logic to modify the invoicing cycle date depending on the issuing source
# Description

Hyperline invoices/credit notes have an issuing date that corresponds to the moment in which these are actually created.

This is an issue since it means that an invoice or credit note posted today, 4th March 2025, that is supposed to be related to February 2025 invoicing cycle, will have:

* If the document is posted in Hyperline, an issuing date on the March 2025
* If the document is NOT posted in Hyperline, an issuing date on February 2025

This PR just creates a field that handles the logic effectively, to be used further in other reports/kpis purposes.

# 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: #28158
2025-03-04 11:32:52 +00:00
Oriol Roqué Paniagua
dcf0f205a2 Merged PR 4568: Adds flag to identify invoices/credit notes that are posted in Hyperline
# Description

Adds flag to identify invoices/credit notes that are posted in Hyperline.
For Invoices, these need to be ACCREC and follow a convention of 20XX-Y
For Credit Notes, these need to be ACCRECCREDIT and follow a convention of CN-20XX-Y

# 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: #28146
2025-03-04 10:12:03 +00:00
Joaquin Ossa
dda393d693 Resolution exposure update 2025-03-03 15:32:47 +01:00
Oriol Roqué Paniagua
230f4c08de Merged PR 4560: Update exposures main kpis
# Description

Update exposures main kpis with the latest YTD/MTD/Target addition.

Code compiles correctly

# 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: #27609
2025-03-03 14:30:58 +00:00
Joaquin Ossa
b2e15bbbab Merged PR 4546: Calculator changes
# Description

After talking with the Ant he we realised that the `was_overriden` was not properly set up so I removed it.
Added all calculated and submitted values for both guests and hosts and left out values in USD since we are not going to use them on the report.

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

Calculator changes

Related work items: #27812
2025-02-28 11:25:29 +00:00
Joaquin Ossa
b20cb44779 Calculator changes 2025-02-28 12:19:24 +01:00
Joaquin Ossa
da0b0dad67 Updated all service_business_type tests 2025-02-28 11:14:40 +01:00
Joaquin Ossa
2bc8e6c0c3 Updated test 2025-02-28 09:49:31 +01:00
Joaquin Ossa
c85ce8d0a7 new dash guest agreement fix 2025-02-28 09:13:29 +01:00
Oriol Roqué Paniagua
cfc17a5d3a Merged PR 4528: Adds number format
# Description

Adds number format for display purposes

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

Adds number format

Related work items: #27609
2025-02-27 13:18:03 +00:00
Joaquin Ossa
42701b4d2c Merged PR 4530: first comment time added
# Description

First comment time added

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

first comment time added

Related work items: #27812
2025-02-27 12:28:09 +00:00
Joaquin Ossa
6f28c4d9dc numeric 2025-02-26 16:51:56 +01:00
Joaquin Ossa
aaa0b1a5dd changed name 2025-02-26 16:45:01 +01:00
Joaquin Ossa
0fd8c21e38 Small changes 2025-02-26 16:22:32 +01:00
Joaquin Ossa
ed707849e7 Merged PR 4515: resolutions incidents to reporting
# Description

Resolutions incidents model to 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.

# Other

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

resolutions incidents to reporting

Related work items: #27811
2025-02-26 08:19:16 +00:00
Joaquin Ossa
00d3922104 Merged PR 4508: New Resolutions model to intermediate
# Description

Resolutions incidents model to intermediate
This one shows all relevant details of the resolution process, the amount asked by the host, the one proposed by the calculator and the final settlement amount.
It also includes useful data for the resolutions team, like who is the current responsible agent or how many comments have there been in the process, etc.

# 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: #27811
2025-02-26 07:27:05 +00:00
Joaquin Ossa
465bd51ff2 Final update 2025-02-26 08:24:50 +01:00
Joaquin Ossa
cfc6971cb4 Addressed comments 2025-02-25 16:58:14 +01:00
Oriol Roqué Paniagua
84bdfe6083 Merged PR 4510: Fix sign
# Description

Fix sign...

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

Fix sign

Related work items: #27609
2025-02-25 15:24:05 +00:00
Joaquin Ossa
c49239a7cf Final changes 2025-02-25 15:25:37 +01:00
Joaquin Ossa
daa93c056c commit wip 2025-02-25 15:25:37 +01:00
Joaquin Ossa
335fccd57e updated schema 2025-02-25 15:25:37 +01:00
Joaquin Ossa
68bddf2b7d Commit update 2025-02-25 15:25:37 +01:00
Joaquin Ossa
7f8e7489e4 finished schema 2025-02-25 15:25:37 +01:00
Joaquin Ossa
63a2eff6e2 finished schema 2025-02-25 15:25:37 +01:00