Skip to main content

Extended Blending

Blend the same dimension across different tables in a single query using extended_blend_group.

Overview

When the same logical dimension (e.g. Order Date, Customer) exists in more than one table with different physical columns, you can mark them with a shared extended_blend_group. Strata can then treat them as one blended dimension when building queries across those tables.

Configuration

Set the same extended_blend_group value on each dimension that should blend together:

# In tbl.orders.yml
fields:
- type: dimension
name: Order Date
data_type: date
extended_blend_group: order_date_blend
expression:
sql: order_date
# In tbl.shipments.yml
fields:
- type: dimension
name: Order Date
data_type: date
extended_blend_group: order_date_blend
expression:
sql: shipment_date

Dimensions in the same extended_blend_group can be used together in a query even when they come from different tables; the planner will blend them according to the model and relationships.

When to Use

  • Same business dimension, different tables — e.g. “Order Date” in orders vs shipments
  • Cross-table date alignment — Comparing or filtering by a common date concept across fact tables
  • Shared attributes across models — A dimension that is defined in multiple tables and should behave as one for querying

Requirements

  • Same extended_blend_group string (case-insensitive) on each dimension
  • Compatible data_type (e.g. both date or both date_time)
  • Dimensions must be in the same branch/universe for blending to apply

Example: Cross-Table Date

# tbl.sales.yml
fields:
- type: dimension
name: Sale Date
data_type: date
extended_blend_group: activity_date
grains:
- day
- week
- month
- quarter
- year
expression:
sql: sale_date
- type: measure
name: Revenue
...

# tbl.returns.yml
fields:
- type: dimension
name: Return Date
data_type: date
extended_blend_group: activity_date
grains:
- day
- week
- month
- quarter
- year
expression:
sql: return_date
- type: measure
name: Returned Amount
...

With activity_date as the shared extended_blend_group, queries can use a single “activity date” concept across both sales and returns.

Advanced: Blend Groups and Query Planning

For how blend groups affect query planning, path formation, and multi-table scenarios, see Extended blending groups.

Next Steps