Documentation Index
Fetch the complete documentation index at: https://cubed3-docs-cub-2416-update-semantic-snowflake-semantic-vie.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use case
In scenarios where a large dataset spanning multiple years is pre-aggregated with partitioning, it is often useful to only rebuild pre-aggregations between a certain date range (and therefore only a subset of all the partitions). This is because recalculating all partitions is often an expensive and/or time-consuming process. This is most beneficial when using data warehouses with partitioning support (such as AWS Athena and Google BigQuery).Data modeling
Let’s use an example of a cube with a nested SQL query:sql property, and is
configured to incrementally build them as long as the date range is not before
January 1st, 2021.
However, if we only wanted to build pre-aggregations between a particular date
range within the users table, we would be unable to as the current configuration
only applies the date range to the final result of the SQL query defined in
sql.
In order to do the above, we’ll “push down” the predicates to the inner SQL
query using FILTER_PARAMS in conjunction
with the build_range_start and build_range_end
properties:
Result
By addingFILTER_PARAMS to the subquery inside the sql property, we now
limit the initial size of the dataset by applying the filter as early as
possible. When the pre-aggregations are incrementally built, the same filter is
used to apply the build ranges as defined by build_range_start and
build_range_end.