Workspace Examples¶
This page demonstrates how to manage Microsoft Fabric workspaces using the CLI. Workspaces are containers for Fabric items and provide collaboration and security boundaries.
Resource Type
Type: .Workspace
To explore all workspace commands and their parameters, run:
Navigation¶
Navigate to a workspace using the full workspace path.
Navigate to a workspace using relative path from current context.
Navigate to your personal workspace using the workspace name or shortcut.
Workspace Management¶
Create Workspace¶
Create a workspace. Use -P capacityName=<capacity name>
to specify inline capacity (default: CLI-configured capacity config set default_capacity <>).
Create with Default Capacity¶
Create a workspace using the CLI-configured default capacity.
Create with Specific Capacity¶
Create a workspace and assign it to a specific capacity.
Create Without Capacity¶
Create a workspace without assigning it to any capacity.
Check Workspace Existence¶
Check if a workspace exists and is accessible.
Get Workspace¶
Get Workspace Details¶
Retrieve full workspace details.
Query Specific Properties¶
Query workspace properties using JMESPath syntax.
Export Query Results¶
Save query results to a local file.
List Workspaces and Folders¶
List All Workspaces and Folders¶
Display available workspaces with different detail levels.
Hidden elements at tenant level include:
- Capacities (
.capacities
) - Connections (
.connections
) - Domains (
.domains
) - Gateways (
.gateways
)
List Workspace Items¶
Display items within a specific workspace.
# Simple list
fab ls ws1.Workspace
# Detailed list
fab ls ws1.Workspace -l
# Include hidden workspace elements
fab ls ws1.Workspace -la
Hidden elements at workspace level include:
- External Data Shares (
.ExternalDataShare
) - Managed Identities (
.ManagedIdentity
) - Managed Private Endpoints (
.ManagedPrivateEndpoint
) - Spark Pools (
.SparkPool
)
To always show hidden elements without using -a
, configure: fab config set show_hidden true
Update Workspace¶
Update Workspace Display Name¶
Change the workspace display name.
Update Workspace Description¶
Set or modify the workspace description.
Configure Spark Runtime Version¶
Update the Spark runtime version for the workspace.
Assign Starter Pool¶
Assign the Starter Pool as the default pool for the workspace.
fab set ws1.Workspace -q sparkSettings.pool.defaultPool -i '{"name": "Starter Pool","type": "Workspace"}'
Assign Custom Pool¶
Assign a custom Spark pool as the default pool.
fab set ws1.Workspace -q sparkSettings.pool.defaultPool -i '{"name": "spool1","type": "Workspace","id": "00000000-0000-0000-0000-000000000000"}'
Remove Workspace¶
Remove Multiple Workspaces Interactively¶
Select and remove multiple workspaces (interactive mode only).
Remove Workspace Items Selectively¶
Remove specific items from a workspace (interactive mode).
Force Remove Entire Workspace¶
Delete workspace and all its contents without confirmation.
Using -f
flag will delete the entire workspace and all items permanently. Use with extreme caution
Workspace Operations¶
Export Workspace Items¶
When you export item definition, the sensitivity label is not part of the definition
Export items from a workspace to an output path. Supported for exportable items; use -a
to export all the items.
Export Workspace Items to Local Directory¶
Export items from a workspace to a local directory.
Windows OS File Name Restrictions
In Windows, items with names containing \ / : * ? " < > |
will cause export errors. Provide a valid name in the output path to resolve this:
Export Workspace Items to Lakehouse Files¶
Export workspace items directly to a Lakehouse Files location.
fab export ws1.Workspace -o /ws1.Workspace/lh1.Lakehouse/Files
# Export all items
fab export ws1.Workspace -o /ws1.Workspace/lh1.Lakehouse/Files -a
Copy Workspace Items¶
Copy Items Between Workspaces¶
Copy items from one workspace to another. Supported for exportable items.
Move Workspace Items¶
Move Items Between Workspaces¶
Move items from one workspace to another (interactive mode only).
Open in Browser¶
Open Workspace in Web Browser¶
Launch the workspace in your default web browser.