Documentation Index
Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Order of Filtering and Computation
Every query on Honeydew computes needed metrics and applies user filters based on context. The context of a query includes the domain it operates on the source it came from (SQL interface or a Dynamic Dataset). The logical order of applying filters:- Source data: as defined in source tables, including any custom SQL filters
- Domain source filters that filter out data from specific source tables, before any computation
- Entities and their calculated attributes: including calculated attributes that use filtered metrics that add their own filter
- Domain semantic filters that control accessible data across the semantic layer
- User query filters:
- When using the SQL interface, filters in the SQL (
WHEREandHAVING) - When using Dynamic Datasets, filters in the Dynamic Dataset definition
- When using the SQL interface, filters in the SQL (
- Metrics, including filters of filtered metrics in use
Example
Consider:- A semantic schema with
lineitem,ordersandcustomersentities - A domain set up with:
- Source filters
orders.order_date >= '1990-01-01'andlineitem.status = 'F' - Semantic filter
customers.c_nationkey = 10
- A user that asks for
orders.countwith a query filter oforders.order_date >= '1996-01-01'
- Select from
orderswith source filterorders.order_date >= '1990-01-01' - Select from
customers - Apply semantic filter
customers.c_nationkey = 10:- Filter the
customersentity and join it toorders - Note that
ordersgets the filter through its INNER join to filteredcustomers
- Filter the
- Apply query filter
orders.order_date >= '1996-01-01' - Calculate
orders.counton the resulting filtered data
orders.order_date >= '1996-01-01' will be actually executed at step (1), when selecting from orders.
The reason is that it can be safely pushed down earlier in the query execution without affecting results.