Commit graph

1607 commits

Author SHA1 Message Date
Pablo Martin
35cd4f4fcd change pool 2025-03-18 15:54:46 +01:00
Pablo Martin
c786ccf5c1 remove compile 2025-03-18 13:44:30 +01:00
Pablo Martin
e424ed7581 add ci yml 2025-03-18 13:41:40 +01:00
Joaquin
a145a00b4d Adding id_deal 2025-03-18 12:06:25 +01:00
Oriol Roqué Paniagua
dd9bb8a11b Merged PR 4713: Adds a master table for guest products price plans
# Description

Adds a master table for pricing regarding Guest Products in intermediate.

I also added in staging a missing description for a field.

This is a necessary step to work out the prices on guest products payments, which will come in a separated PR.

# 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.
- [ ] I've picked the right materialization for the affected models. **Left it as a view, let's adapt in the future if needed**

# Other

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

Related work items: #28513
2025-03-18 10:56:33 +00:00
uri
74a76fe8fc Removes configuration status and adds config id for further joins 2025-03-18 09:20:31 +01:00
uri
91e7fe09b1 Adds end date 2025-03-18 09:09:59 +01:00
uri
cba4b97082 Adds a master table for guest products price plans 2025-03-17 16:35:50 +01:00
Joaquin Ossa
b518c536f2 Merged PR 4698: Added business scope to models
# Description

Added business scope to models `monthly_aggregated_metrics_history_by_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.
- [ ] 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.

Added business scope to models

Related work items: #28501
2025-03-14 13:33:10 +00:00
Joaquin
e9cfb6c2bd Addressed comments 2025-03-14 14:20:57 +01:00
Oriol Roqué Paniagua
918ed969d8 Merged PR 4699: Creates a master table for guest products
# Description

Creates a master table for guest products in intermediate. It just gathers information on the name and the latest display name, as well as a couple of additional time fields.

I opted for "latest" rather than "current" because technically Guest Products can be enabled and disabled, and I believe current name would be weird if the product is disabled. Anyway. Next step will be actually creating a master table on guest product configuration, that will handle this disable logic and so on.

# 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: #28513
2025-03-14 13:04:46 +00:00
Joaquin
89b3989d19 Added business scope to models 2025-03-14 11:48:22 +01:00
Joaquin Ossa
72118389d6 Merged PR 4693: Live Dates according to HubSpot
# Description

Made the change as discussed during the daily.
Here we can see an example of the impact with the change (left old lifecycle, right new one)
The biggest impact comes from the Never Booked deals, 110, and Active 34.
![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/4693/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.
- [ ] 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: #28475
2025-03-14 10:20:34 +00:00
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 Ossa
8c97f03487 Merged PR 4697: Churn update
# Description

Added churn details from hubspot (free text detailing churn reason)

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

Churn update

Related work items: #28501
2025-03-14 09:33:19 +00: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
a0b2f9b657 Merged PR 4649: Updated exposures
# Description

_Describe your motivation and changes here._

# Checklist

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

Updated exposures

Related work items: #28190
2025-03-10 10:22:47 +00:00
Joaquin Ossa
459b1b3833 Updated exposures 2025-03-10 10:57:21 +01:00
Joaquin Ossa
cc9b4ade71 Merged PR 4628: Churn deals
# Description

New model for Churn report.
It contains all deals that are churned/cancelled according to HubSpot on a monthly basis, it includes revenue, bookings created (by time windows) and number of listings per 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.
- [ ] 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: #28190
2025-03-07 10:48:52 +00: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
9f580867c0 Merged PR 4622: New Dash bug fix
# Description

Filters by `bs.is_user_in_new_dash = true and bs.is_missing_id_deal = false` for services in bookings

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

New Dash bug fix

Related work items: #28194
2025-03-06 08:23:27 +00: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
2a0172edd5 Merged PR 4561: Resolution exposure update
# Description

Resolution exposure update

# Checklist

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

Resolution exposure update

Related work items: #27812
2025-03-03 14:33:49 +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
Oriol Roqué Paniagua
991cea71a8 Merged PR 4556: Remove 2025 FY targets
# Description

Removes targets of FY 2025 (Jan 25 to Mar 25) to be able to deploy the report without fake info.

# 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: #27609, #27805
2025-03-03 10:35:24 +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
47e9178b21 Merged PR 4545: Updated all service_business_type tests
# Description

Updated all service_business_type tests

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

Updated all service_business_type tests

Related work items: #28068
2025-02-28 11:23:11 +00:00