Save Cache Population Rules
Resources
Below is an example of JSON structure which can be used as a reference for the cacheStrategyRulesJson parameter in the request body.
{
"entities":[
{
"subType":"CUBE",
"rules":[
{
"cacheOnCubeRebuild":"ALL",
"cacheAction":"REPOPULATE_CACHE",
"precacheSqlCascadingFilters":"AUTO",
"metaDataColumns":[
],
"id":"17037685054133172360",
"filters":[
{
"isMemberValue":true,
"fieldName":"QUERY_STATUS",
"firstValue":"Success",
"searchContext":"",
"includeCurrent":false,
"useField":false,
"fieldDisplayName":"Query Status",
"relation":"AND",
"useFieldType":"VALUE",
"isAppliedOnDisplayField":true,
"delimiter":"^`~",
"secondValue":"",
"valueType":"predefined",
"id":"f1",
"nonVisual":false,
"firstDisplayValue":"Success",
"suspend":false,
"isParameter":false,
"valueBy":"",
"dataType":"CHAR",
"topN":{
"field":""
},
"topNDisplayValue":"",
"endEnclosure":"",
"isSearchFilter":false,
"sortOrder":"",
"startEnclosure":"",
"filterType":"",
"showInDataCard":false,
"secondDisplayValue":"",
"operation":"INLIST",
"fieldType":"CACHE_BUILD_RULE",
"isIncludedForContextSearch":true
}
],
"type":{
"META_QUERY":true
}
}
],
"id":"106157",
"type":"ANALYTICAL"
}
]
}JSON Fields Description
Field | Type | Description | Possible Values | Example |
entities | Array | Array of entity objects with cache population rules | Array of Entity objects | [{...}] |
entities[].id | String | Unique identifier of the semantic model (cube) to which cache population rules are applied | Valid semantic model GUID | "17764122062715127080024192718499" |
entities[].type | String | Entity type classification | "ANALYTICAL" | "ANALYTICAL" |
entities[].subType | String | Entity sub-type classification | "CUBE" | "CUBE" |
entities[].rules | Array | Array of cache population rule definitions for this semantic model | Array of Rule objects | [{...}] |
entities[].rules[].id | String | Unique identifier for this cache population rule. Auto-generated if not provided for new rules | GUID or empty for new rules | "rule_17764122062715" |
entities[].rules[].cacheOnCubeRebuild | String | Whether to automatically execute this cache rule when the semantic model is rebuilt. When "true", cache is populated immediately after each cube build completes | "true", "false", "" | "true" |
entities[].rules[].cacheAction | String | Action to perform on cache. REPOPULATE_CACHE clears existing cache and rebuilds. APPEND_CACHE adds new data without clearing existing cache | "REPOPULATE_CACHE", "APPEND_CACHE" | "REPOPULATE_CACHE" |
entities[].rules[].precacheSqlCascadingFilters | String | Whether to use SQL-based cascading filters for pre-caching. When enabled, filter values are fetched using SQL queries for better performance with large datasets | "true", "false", "" | "true" |
entities[].rules[].type | Array | Array of rule types indicating what kind of caching to perform. Multiple types can be selected for a single rule | ["OLAP"], ["META_QUERY"], ["OLAP", "META_QUERY"] | ["OLAP"] |
entities[].rules[].filters | Array | Array of filter definitions that determine which data subset to cache. Filters restrict the cache to specific dimension members or measure ranges | Array of Filter objects | [{...}] |
entities[].rules[].filters[].id | String | Unique identifier for this filter | Filter ID string | "qf1" |
entities[].rules[].filters[].fieldName | String | Fully qualified name of the field to filter on. For dimensions, use MDX format like [Dimension].[Hierarchy].[Level] | MDX field name | "[Product].[Category].[Category]" |
entities[].rules[].filters[].fieldDisplayName | String | Human-readable display name of the field for UI purposes | Any descriptive name | "Product Category" |
entities[].rules[].filters[].fieldType | String | Type of field being filtered | "DIMENSION", "MEASURE" | "DIMENSION" |
entities[].rules[].filters[].dataType | String | Data type of the field values | "CHAR", "NUMBER", "DATE" | "CHAR" |
entities[].rules[].filters[].operation | String | Filter operation to apply. Different operations available based on field type and data type | "INLIST", "NOTINLIST", "EQUAL_TO", "NOT_EQUAL_TO", "GREATER_THAN", "LESS_THAN", "GREATER_THAN_EQUAL_TO", "LESS_THAN_EQUAL_TO", "BETWEEN", "CONTAINS", "STARTSWITH", "ENDSWITH", "ISNULL", "ISNOTNULL", "IS_IN_TOP", "IS_IN_BOTTOM" | "INLIST" |
entities[].rules[].filters[].firstValue | String | Primary filter value. For INLIST/NOTINLIST, use delimiter-separated values. For BETWEEN, this is the lower bound | Filter value(s) | "Electronics", "Electronics!!!Clothing" |
entities[].rules[].filters[].firstDisplayValue | String | Display value corresponding to firstValue for UI purposes | Display value(s) | "Electronics" |
entities[].rules[].filters[].secondValue | String | Secondary filter value. Used for BETWEEN operation as upper bound, or for operations requiring two values | Filter value | "1000" |
entities[].rules[].filters[].secondDisplayValue | String | Display value corresponding to secondValue | Display value | "1000" |
entities[].rules[].filters[].firstParameterValue | String | Parameter reference for dynamic first value. Used when filter value comes from a parameter | Parameter reference | "" |
entities[].rules[].filters[].secondParameterValue | String | Parameter reference for dynamic second value | Parameter reference | "" |
entities[].rules[].filters[].valueDelimiter | String | Delimiter used to separate multiple values in firstValue for INLIST/NOTINLIST operations | Delimiter string | "!!!" |
entities[].rules[].filters[].relation | String | Logical relation with the next filter in the array | "AND", "OR", "NONE" | "AND" |
entities[].rules[].filters[].startEnclosure | String | Opening parenthesis for grouping filters in complex expressions | "(", "" | "" |
entities[].rules[].filters[].endEnclosure | String | Closing parenthesis for grouping filters | ")", "" | "" |
entities[].rules[].filters[].isMemberValue | Boolean | Whether the filter value represents a dimension member (true) or a raw value (false) | TRUE, FALSE | TRUE |
entities[].rules[].filters[].isAppliedOnDisplayField | Boolean | Whether the filter is applied on the display field (true) or the key field (false) | TRUE, FALSE | TRUE |
entities[].rules[].filters[].isActive | Boolean | Whether this filter is currently active and should be applied | TRUE, FALSE | TRUE |
entities[].rules[].filters[].filterType | String | Classification of filter type for UI organization | "QUICK", "ADHOC" | "QUICK" |
entities[].rules[].filters[].valueType | String | Type of value being used in the filter | "predefined", "custom", "dynamic", "parameter" | "custom" |
entities[].rules[].filters[].valueBy | String | How the filter value is determined | "VALUE", "FIELD", "PARAMETER" | "VALUE" |
entities[].rules[].filters[].isFirstValuePreDefDateValue | Boolean | Whether firstValue is a predefined date value (like "Today", "Yesterday") | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isSecondValuePreDefDateValue | Boolean | Whether secondValue is a predefined date value | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isFirstValueFromPredefList | Boolean | Whether firstValue is selected from a predefined list | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isSecondValueFromPredefList | Boolean | Whether secondValue is selected from a predefined list | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isFirstValueDynamic | Boolean | Whether firstValue is dynamically calculated | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isSecondValueDynamic | Boolean | Whether secondValue is dynamically calculated | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isFirstValueQualified | Boolean | Whether firstValue uses qualified member names | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isParameter | Boolean | Whether this filter is a parameter filter that accepts user input at runtime | TRUE, FALSE | FALSE |
entities[].rules[].filters[].isUseField | Boolean | Whether the filter uses another field for comparison instead of a static value | TRUE, FALSE | FALSE |
entities[].rules[].filters[].useFieldType | String | When isUseField is true, specifies the type of field used for comparison | "MEASURE", "SET" | "" |
entities[].rules[].filters[].topNField | String | For IS_IN_TOP/IS_IN_BOTTOM operations, the measure field used for ranking | Measure field name | "[Measures].[Sales Amount]" |
entities[].rules[].filters[].topNFieldDisplayName | String | Display name of the topN field | Display name | "Sales Amount" |
entities[].rules[].filters[].firstValueLevelIndex | String | Level index for hierarchical filtering | Level index | "" |
entities[].rules[].filters[].includeCurrent | Boolean | For relative time filters (LAST, NEXT), whether to include the current period | TRUE, FALSE | FALSE |
entities[].rules[].filters[].sortOrder | String | Sort order for filter values in UI | "ASC", "DESC" | "" |
entities[].rules[].filters[].searchContext | String | Search context for filter value lookup | Search context | "" |
entities[].rules[].filters[].displayValueDateFormat | String | Date format pattern for displaying date values | Date format pattern | "MM/dd/yyyy" |
entities[].rules[].filters[].fieldEntityInfo | JSON Object | Additional entity information for the filtered field | Entity info object | {...} |
entities[].rules[].metaDataColumns | Array | For META_QUERY type rules, specifies which metadata columns to include in the cache. Only used when "META_QUERY" is in the type array | Array of MetaDataColumn objects | [{...}] |
entities[].rules[].metaDataColumns[].name | String | Name of the metadata column to include in cache | Column name | "ProductName" |
entities[].rules[].metaDataColumns[].displayName | String | Display name for the metadata column | Display name | "Product Name" |
entities[].rules[].metaDataColumns[].dataType | String | Data type of the metadata column | "CHAR", "NUMBER", "DATE" | "CHAR" |
entities[].rules[].indexingData | JSON Object | Configuration for search indexing when caching includes index building | - | {...} |
entities[].rules[].indexingData.config | JSON Object | Detailed indexing configuration settings | Indexing config object | {...} |