Documentation Index
Fetch the complete documentation index at: https://cubed3-igor-core-418-duplicate-view-definitions-break-deplo.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use case
You can use thesql parameter to define cubes
over arbitrary SQL queries. Sometimes, these queries might be fairly complex
and take substantial time to execute. That’s totally okay because you can use
pre-aggregations to accelerate queries to such cubes.
However, if you have more than one pre-aggregation that references members of
such a cube, its sql expression would have to be executed each time every
pre-aggregation is built. This also the case if you run both pre-aggregated
and non-pre-aggregated queries against such a cube.
A special original_sql pre-aggregation
can help:
- First, it will materialize the results of the
sqlexpression in the data source. - Then, it will make these results available to other
rolluppre-aggregations and non-pre-aggregated queries.
Configuration
We can do this by creating a pre-aggregation of typeoriginal_sql on the data source
database, and then configuring our existing rollup
pre-aggregations to use the original_sql pre-aggregation with the
use_original_sql_pre_aggregations property.
Result
With the above data model, themain pre-aggregation is built from the base
pre-aggregation.