In a Microsoft SQL Server 2016 environment, you process multiple partitions of a table in parallel. When you trace the progress, you notice a re-encoding event for at least one of the columns.
In this situation, the processing operation may fail with an exception error. Sometimes, processing may be completed successfully but then subsequent queries fail with an exception error that resembles the following:
An unexpected exception occurred.
An unexpected exception occurred. (Microsoft SQL Server 2016 Analysis Services)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider.ExecuteTabular(CommandBehavior behavior, ICommandContentProvider contentProvider, AdomdPropertyCollection commandProperties, IDataParameterCollection parameters)
at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteReader(CommandBehavior behavior)
Note Sometimes this problem occurs after processing is completed and queries are being executed against the processed data.
Cumulative update information
The fix for this issue is included in the following cumulative update for SQL Server:
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
To work around this issue, do one of the following:
Determine which columns require re-encoding, and use a fake partition at the beginning to generate values that will force hash encoding in the detection phase. The fake partition must be the one that's used to select the encoding before parallelism begins. After all the partitions have been processed, you can clear or delete the fake partition.
Use serial processing instead of parallel processing.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Parallel processing of Tabular partitions has the following logic:
Use the data in the one partition to determine the encoding (either value or hash) of the columns.
After the encoding is selected, the other partitions can start to process in parallel.
If value encoding is selected and as the rows are being fetched, a value may be encountered that doesn't fit in the value encoding scheme. In this case, the whole column must be re-encoded into the hash encoding scheme.
This re-encoding operation (converting value encoding into hash encoding) encounters a problem when other partitions are being processed at the same time.
Learn about the terminology that Microsoft uses to describe software updates.