High cardinality thresholds in SAS® Visual Analytics for SAS® Viya®


High Cardinality Limits

SAS Visual Analytics imposes limits on the amount of data that can be displayed in an individual report object. The limits are designed to improve performance and minimize the risk of crashing the web browser or the Report Data service. If you exceed these limits, the behavior of the report object varies. For example, a list table might render only a portion of the results, but a crosstab might not render any data.

CAUTION: Making changes to any of the cardinality properties is done at your own risk, and it is strongly recommended that you test modifications in a non-production environment first. With the exception of MaxRowsLookup, these properties impact all report objects and could lead to unsatisfactory results. For example, performance might be significantly worse, or the Report Data service might crash. 

About the Properties

The following properties control the maximum number of rows that are returned for a given report object:

 

Property NameDefault ValuePre-Defined or SupplementalDescription
MaxRowsLookupVaries per report objectPre-definedRefer to the SAS Visual Analytics documentation for more information. This limit can be controlled either globally from SAS® Environment Manager, or on a per-report basis when you edit the report and select to Override the System Data Limit. This value is in rows.
defaultMaxCellsProduced250000Pre-definedClient-side limitation. This value represents the maximum number of cells generated in a result set for a report object that the client will attempt to render.
midtierCellLimit800000SupplementalServer-side limitation. This value represents the maximum number of cells generated in a result set for a report object that the Report Data service allows for processing.
midtierAllocationByteLimit10000000SupplementalServer-side limitation. This value is in bytes and represents the total amount of space to allow for a single result set. It is calculated based on the length of a single row of data multiplied by the number of rows returned. 
protobufSizeLimit64000000SupplementalServer-side limitation. This value is in bytes, and is related to the length of all categorical data items in a single row of data in the result set. It is calculated based on this length multiplied by the number of rows returned.
categoryCardinalityServerLimit50000SupplementalServer-side limitation. This value represents the maximum number of rows when categories are grouped together.

 

Calculating the Number of Rows and Cells

For most report objects, you can use the following methods to calculate the number of rows and cells a report object will generate:

To calculate the number of rows:

  1. Concatenate all categories together.
  2. Calculate the distinct count of this concatenation.

Note: For crosstabs, you must do these steps once for all categories used in the Column role, and once for all categories used in the Row role, and then multiply those two values together. 
 

To calculate the number of cells:

Setting Properties

All of these properties can be defined for the Report Data service in SAS Environment Manager. The MaxRowsLookup value can also be set per report by editing the Override the Server Limit option for any report object.


To set the properties, you can follow these steps:

IMPORTANT: Do not use commas in any cardinality property values.

  1. Log on to SAS Environment Manager as an Administrator.
  2. Navigate to Configuration ► All Services ► Report Data Service.
  3. Edit the sas.reportdata.properties section.
  4. The defaultMaxCellsProduced and MaxRowsLookup properties are predefined and can be adjusted here. 
  5. If you need to adjust any of the other cardinality properties, click the Add Property link under Supplemental Properties, and add the property name and value. 
    • Note: If you need to adjust the midtierAllocationByteLimit or protobufSizeLimit, first check to see if your CAS table is using VARCHAR types for character data items. VARCHAR lengths can be much higher than the actual values of data items, and it is recommended you first adjust these lengths before making any adjustments to the midtierAllocationByteLimit and protobufSizeLimit values. Otherwise, SAS recommends setting each to 100000000 as a starting point.
  6. Restart the report data service to ensure the changes have been set. 
  7. Close and re-open the report in SAS Visual Analytics.

If you sometime later delete these properties from the Report Data service, you must restart the Report Data service in order for those changes to be picked up. Otherwise, SAS Visual Analytics continues to use the previously defined values for the properties until the service is restarted.

Troubleshooting Cardinality Problems

  1. Log on to SAS Environment Manager as an Administrator.
  2. Navigate to Configuration ► All Services ► Report Data Service.
  3. Edit the logging.level: com.sas.bidata section.
  4. Set the level to DEBUG.
  5. Click Save to save changes.
  6. Wait 30 seconds to allow the Report Data service to pick up the changes.