Skip to content

feat: add ranch_revenue filtered metric to dbt_orders - #105

Open
lightdash[bot] wants to merge 1 commit into
mainfrom
lightdash-ai-writeback/fdd44fc8-8e4d-4448-8fde-16a18eeee6fb
Open

lightdash[bot] wants to merge 1 commit into
mainfrom
lightdash-ai-writeback/fdd44fc8-8e4d-4448-8fde-16a18eeee6fb

Conversation

@lightdash

@lightdash lightdash Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new ranch_revenue metric to the basket_total column in dbt_orders.yml
  • Mirrors sum_of_basket_total (type: sum, same format) but filters to rows where partner_name = 'Redwood Ranch'
  • Label: "Ranch Revenue", with description "Total revenue from the Redwood Ranch partner only."
  • No existing metrics were modified

Test plan

  • Confirm ranch_revenue appears in the Orders explore in Lightdash
  • Verify the metric value matches a manual filter of partner_name = 'Redwood Ranch' applied to sum_of_basket_total
  • Confirm all other existing metrics are unaffected

## Summary

- Adds a new `ranch_revenue` metric to the `basket_total` column in `dbt_orders.yml`
- Mirrors `sum_of_basket_total` (type: sum, same format) but filters to rows where `partner_name = 'Redwood Ranch'`
- Label: "Ranch Revenue", with description "Total revenue from the Redwood Ranch partner only."
- No existing metrics were modified

## Test plan

- [ ] Confirm `ranch_revenue` appears in the Orders explore in Lightdash
- [ ] Verify the metric value matches a manual filter of `partner_name = 'Redwood Ranch'` applied to `sum_of_basket_total`
- [ ] Confirm all other existing metrics are unaffected

Co-authored-by: lightdash[bot] <183517231+lightdash[bot]@users.noreply.github.com>
Co-authored-by: Oliver Laslett <oliver@lightdash.com>
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Lightdash Validation Results

Validating default project 8a223608-a1e4-426e-adcd-0598ea72b9f8

/opt/hostedtoolcache/Python/3.10.20/x64/lib/python3.10/site-packages/google/api_core/_python_version_support.py:255: FutureWarning: You are using a Python version (3.10.20) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
/opt/hostedtoolcache/Python/3.10.20/x64/lib/python3.10/site-packages/google/api_core/_python_version_support.py:255: FutureWarning: You are using a Python version (3.10.20) which Google will stop supporting in new releases of google.cloud.dataproc_v1 once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.cloud.dataproc_v1 past that date.
  warnings.warn(message, FutureWarning)

- SUCCESS> dbt_users 
- SUCCESS> dbt_orders 
- SUCCESS> dbt_baskets 
- SUCCESS> dbt_orders_no_preagg 
- SUCCESS> dbt_support_requests 

Compiled 5 explores, SUCCESS=5 ERRORS=0
-   Waiting for validation to finish
✖   Validation finished in 22s with 6 errors


- Tables: 0 errors
- Charts: 4 errors
- Dashboards: 2 errors


NAME                                                         LAST UPDATED BY   LAST UPDATED AT ERROR                                                                           
How do order volume and order values trend over time?        Jess Hitchcock      2026-05-13    Metric error: the field 'dbt_orders_median_revenue_per_order' no longer exists  
Partner Sales by Month - Last 12 Months                      Rohan Bedi          2026-06-11    Metric error: the field 'monthly_partner_info_total_sales' no longer exists     
with tc sql What is the median revenue per order by partner? João Viana          2026-04-30    Metric error: the field 'dbt_orders_median_revenue_per_order' no longer exists  
XLSX Export Test Table                                       Giorgi Bagdavadze   2026-06-09    Metric error: the field 'dbt_orders_median_revenue_per_order' no longer exists  
Sales Updates                                                Rohan Bedi          2026-06-10    The chart 'Partner Sales by Month - Last 12 Months' is broken on this dashboard.
XLSX Export Test Dashboard                                   Giorgi Bagdavadze   2026-06-09    The chart 'XLSX Export Test Table' is broken on this dashboard.                 

--> To see these errors in Lightdash, run lightdash preview

Note: 6 chart configuration warnings hidden. Use --show-chart-configuration-warnings to show.

This validation check is informational and does not block merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants