title: Reduce parallelism when processing a SSAS Tabular model using TOM
body: <p>I process our tabular models (Compatibility level 1200) using the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular?view=sqlserver-2016" rel="nofollow noreferrer">Tabular Object Model</a> and a powershell script. The script uses some metadata to determine what partitions need to be processed for a given table, and then does a <code>process full</code> on those partitions. In some cases, the script will do a <code>Process Full</code> on the entire table (For instance after the first time the model was deployed to the server)</p>
  
  <p>When the script processes an entire table, I want to be able to control how many concurrent queries are executed against the data source at any given time, so in my script, I create a new instance of a <code>Microsoft.AnalysisServices.Tabular.SaveOptions</code> and set the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.saveoptions.maxparallelism?view=sqlserver-2016" rel="nofollow noreferrer">MaxParallelism</a> property to a number between 1 and 10. I then save the changes to the model on the server, and wait for processing to complete.</p>
  
  <pre><code>$serverTable.RequestRefresh([Microsoft.AnalysisServices.Tabular.RefreshType]::Full)
  $db.Update( "ExpandFull")
  $saveOptions = New-Object Microsoft.AnalysisServices.Tabular.SaveOptions
  $saveOptions.MaxParallelism = $maxParallelism   
  $result = $db.Model.SaveChanges($saveOptions)
  </code></pre>
  
  <p>If I monitor the SQL server that the table is connecting to, I see several queries (8 most of the time) from my SSAS box regardless of what I set MaxParallelism to. Reading through the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.saveoptions.maxparallelism?view=sqlserver-2016" rel="nofollow noreferrer">documentation</a> on that property, This value doesn't guarantee parallelism, as the server may enforce other limits. I don't see any <a href="https://docs.microsoft.com/en-us/sql/analysis-services/server-properties/server-properties-in-analysis-services?view=sql-server-2016" rel="nofollow noreferrer">server properties</a> that mention parallelism. What are the other limits/why does this property not affect the number of queries that are run at the same time?</p>