FabricTools v0.33.0 Public Preview

Update-FabricEnvironmentStagingSparkCompute

Updates the Spark compute configuration in the staging environment for a given workspace.

Syntax

Update-FabricEnvironmentStagingSparkCompute [-WorkspaceId] <guid> [-EnvironmentId] <guid>
 [-InstancePoolName] <string> [-InstancePoolType] <string> [-DriverCores] <int>
 [-DriverMemory] <string> [-ExecutorCores] <int> [-ExecutorMemory] <string>
 [-DynamicExecutorAllocationEnabled] <bool> [-DynamicExecutorAllocationMinExecutors] <int>
 [-DynamicExecutorAllocationMaxExecutors] <int> [-RuntimeVersion] <string>
 [-SparkProperties] <Object> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

This function sends a PATCH request to the Microsoft Fabric API to update the Spark compute settings for a specified environment, including instance pool, driver and executor configurations, and dynamic allocation settings.

Examples

Example 1

Update-FabricEnvironmentStagingSparkCompute -WorkspaceId "workspace-12345" -EnvironmentId "env-67890" -InstancePoolName "pool1" -InstancePoolType "Workspace" -DriverCores 4 -DriverMemory "16GB" -ExecutorCores 8 -ExecutorMemory "32GB" -DynamicExecutorAllocationEnabled $true -DynamicExecutorAllocationMinExecutors 2 -DynamicExecutorAllocationMaxExecutors 10 -RuntimeVersion "3.1" -SparkProperties @{ "spark.executor.memoryOverhead"="4GB" }

Parameters

NameTypeReq.Pos.PipelineDescription
-DriverCores int ✓Required 4 –

The number of cores to allocate to the driver.

Default: 0
-DriverMemory string ✓Required 5 –

The amount of memory to allocate to the driver.

-DynamicExecutorAllocationEnabled bool ✓Required 8 –

Boolean flag to enable or disable dynamic executor allocation.

Default: False
-DynamicExecutorAllocationMaxExecutors int ✓Required 10 –

The maximum number of executors when dynamic allocation is enabled.

Default: 0
-DynamicExecutorAllocationMinExecutors int ✓Required 9 –

The minimum number of executors when dynamic allocation is enabled.

Default: 0
-EnvironmentId guid ✓Required 1 –

The unique identifier of the environment where the Spark compute settings will be updated.

-ExecutorCores int ✓Required 6 –

The number of cores to allocate to each executor.

Default: 0
-ExecutorMemory string ✓Required 7 –

The amount of memory to allocate to each executor.

-InstancePoolName string ✓Required 2 –

The name of the instance pool to be used for Spark compute.

-InstancePoolType string ✓Required 3 –

The type of instance pool (either 'Workspace' or 'Capacity').

-RuntimeVersion string ✓Required 11 –

The Spark runtime version to use.

-SparkProperties object ✓Required 12 –

A hashtable of additional Spark properties to configure.

-WorkspaceId guid ✓Required 0 –

The unique identifier of the workspace where the environment exists.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Calls Confirm-TokenState to ensure token validity before making the API request.

Author: Tiago Balabuch, Kamil Nowinski