Handle multi-currency consolidation and budget variance
Consolidation patterns in FeatureQL handle FX conversion and budget variance by converting each entity's local metric before summing them.
website·Indexed 30 days ago
https://docs.featuremesh.comDocumentation for FeatureQL, a functional, entity-centric DSL that transpiles to SQL (DuckDB, Trino, BigQuery). Includes a function reference, core concepts and patterns such as adjacency and hybrid queries, and a getting started guide.
MERGE, field access, UNWRAP, and ARRAY_AGG.RANGE BETWEEN INTERVAL … PRECEDING AND CURRENT ROW on a timestamp column that is sorted via ORDER BY. This can be applied at the top level or inside a TRANSFORM block.INLINE_COLUMNS function allows developers to create small data tables (mock data or lookup tables) directly within FeatureQL without requiring an external SQL source..TRANSFORM() calls together.deduplication pattern to keep only one row per key inside an array of rows. Common implementations include first_last_per_group, top_n, or using row_number to keep the first or last record.RELATED(<aggregate> ON <predicate>) to produce one value per outer entity when a standard key-only VIA relationship cannot express the required match (e.g., range joins, as-of joins, or theta joins).