malloydata / malloy-samples

Malloy model examples and associated datasets
http://www.malloydata.dev
MIT License
15 stars 15 forks source link

View top_brands in ecommerce.malloy results in "Error: Path to structure not found 'gross_margin'" #57

Open slachterman opened 7 months ago

slachterman commented 7 months ago

What happens?

When trying to run the top_brands view defined in ecommerce.malloy, an error "Error: Path to structure not found 'gross_margin'" is thrown

This happens for any view in which aggregates built on top of the *_gross_margin fields are used

To Reproduce

Run this view in ecommerce.malloy

  view: top_products is {
    top: 5
    group_by: inventory_items.product_name
    aggregate: total_sales, percent_of_sales, total_gross_margin, order_item_count
  }

OS:

macOS

Malloy Client:

local VSCode

Malloy Client Version:

v0.3.1711050948 (pre-release)

Database Connection:

DuckDB

lloydtabb commented 6 days ago

fixed in https://github.com/malloydata/malloy-samples/pull/79