Enable Pre-aggregation Caching
Disclaimer - Beta Feature
Support for pre-aggregation caching is in beta. Beta features are available for users to test and provide feedback. They do not have their implementation finalized. The behavior or interface for these features may change in the future.
Do not use beta features in your production environment.
Pre-aggregation tables are stored in the data source. You must therefore ensure that the user has privileges to write into the data source schema that you want to use as a pre-aggregation cache. For more information, refer to the article for the type of database you are using and refer to its User Access Rights section.
To enable pre-aggregation caching, use the /api/v1/entities/dataSources/{dataSourceId}
API to set enableCaching
to true
and set cachePath
to the schema where you want your pre-aggregation cache to be stored. Your API call should look like this:
curl -X PATCH $HOST_URL/api/v1/actions/dataSources/<your-data-source> \
-H 'Content-Type: application/vnd.gooddata.api+json' \
-H "Accept: application/json" \
-H 'Authorization: Bearer $API_TOKEN' \
-d '{
"data": {
"type": "dataSource",
"id": "<your-data-source>",
"attributes": {
"enableCaching": true,
"cachePath": [
"<your-cache-schema>"
]
}
}
}'
Do not set cachePath
to the same value as data source schema! If you do, the scan of the data source populates cache tables into the PDM and even into the LDM.