Item Management Examples¶
This page demonstrates how to manage Microsoft Fabric items using the CLI. Items are the core resource types within Fabric workspaces, including notebooks, reports, lakehouses, etc.
Resource Types
Type: .<item_type>
(e.g., .Notebook
, .Lakehouse
, .Report
)
To explore commands for any item type, run:
See all available item extensions.
Navigation¶
Navigate to an item using its full path.
Navigate to an item using relative path from current context.
Item Management¶
Create Item¶
Unsupported Items: .Dashboard
, .Datamart
, .MirroredWarehouse
, .PaginatedReport
, .SQLEndpoint
Items with Required Parameters:
.MountedDataFactory
:subscriptionId
,resourceGroup
,factoryName
Items with Optional Parameters:
.Lakehouse
:enableSchemas
.Warehouse
:enableCaseInsensitive
.KQLDatabase
:dbtype
,eventhouseId
,clusterUri
,databaseName
.MirroredDatabase
:mirrorType
,connectionId
,defaultSchema
,database
,mountedTables
.Report
:semanticModelId
Create Basic Items¶
Create items without special parameters.
Create Items with Parameters¶
Create items with specific configuration parameters.
Check Item Supported Parameters¶
View supported parameters for any item type.
Check Item Existence¶
Check if a specific item exists and is accessible.
Get Item¶
When you get an item definition, the sensitivity label is not a part of the definition
Unsupported Items: .Dashboard
, .Datamart
, .MirroredWarehouse
, .PaginatedReport
, .SQLEndpoint
Get Item Details¶
Retrieve full item details.
Get All Properties (Verbose)¶
Show comprehensive item properties including extended metadata.
Query Specific Properties¶
Extract specific properties using JMESPath query.
Export Query Results¶
Save query results to a local directory.
List Items¶
List Items in Workspace¶
Display all items within a workspace.
List Items with Details¶
Show items with comprehensive metadata.
List Item Contents¶
Browse contents of items that support folder structures.
fab ls ws1.Workspace/lh1.Lakehouse
fab ls ws1.Workspace/wh1.Warehouse
fab ls ws1.Workspace/sem1.SemanticModel
Items Supporting OneLake Folder Structure:
Update Item¶
Update Display Name¶
Change the display name of an item.
Set Description¶
Add or update item description.
Remove Item¶
Remove Item with Confirmation¶
Delete an item with interactive confirmation.
Force Remove Item¶
Delete an item without confirmation prompts.
Update Item Properties¶
Configurable Properties by Item Type:
- All supported items:
displayName
,description
- Notebook:
lakehouse
,environment
,warehouse
- Report:
semanticModelId
- SparkJobDefinition:
payload
Set default lakehouse, environment, or warehouse for a notebook.¶
# Set default lakehouse
fab set ws1.Workspace/nb1.Notebook -q lakehouse -i '{"known_lakehouses": [{"id": "00000000-0000-0000-0000-000000000001"}],"default_lakehouse": "00000000-0000-0000-0000-000000000001", "default_lakehouse_name": "lh1","default_lakehouse_workspace_id": "00000000-0000-0000-0000-000000000000"}'
# Set default environment
fab set ws1.Workspace/nb1.Notebook -q environment -i '{"environmentId": "00000000-0000-0000-0000-000000000002", "workspaceId": "00000000-0000-0000-0000-000000000000"}'
# Set default warehouse
fab set ws1.Workspace/nb1.Notebook -q warehouse -i '{"known_warehouses": [{"id": "00000000-0000-0000-0000-000000000003", "type": "Datawarehouse"}], "default_warehouse": "00000000-0000-0000-0000-000000000003"}'
Rebind Report to Semantic Model¶
Item Operations¶
Copy Items¶
When you copy an item definition, the sensitivity label is not a part of the definition
Supported Item Types for Copy:
.Notebook
,.SparkJobDefinition
,.DataPipeline
.Report
,.SemanticModel
.KQLDatabase
,.KQLDashboard
,.KQLQueryset
.Eventhouse
,.Eventstream
.MirroredDatabase
,.Reflex
.MountedDataFactory
,.CopyJob
,.VariableLibrary
Copy Item to Workspace¶
Copy an item to the a workspace, preserving its original name.
Copy Item With to Workspace with a new Item Name¶
Copy an item to the destination and rename.
Copy Item to Folder¶
Copy an item into the destination folder. If the folder does not exist, it will be created.
Move Items¶
When you move item definition, the sensitivity label is not a part of the definition
Move Item to Workspace¶
Move an item to a workspace (removes from source).
Move Item To Workspace with a New Name¶
Move an item to the destination and rename.
Move Item To Folder¶
Move an item into a folder, preserving its original name.
Import and Export¶
When you export item definition, the sensitivity label is not a part of the definition
Export to Local¶
Export an item definition to a local directory.
Exportable Item Types:
.Notebook
,.SparkJobDefinition
,.DataPipeline
.Report
,.SemanticModel
.KQLDatabase
,.KQLDashboard
,.KQLQueryset
.Eventhouse
,.Eventstream
,.MirroredDatabase
.Reflex
,.MountedDataFactory
,.CopyJob
,.VariableLibrary
Export to Lakehouse¶
Export item definition directly to a Lakehouse Files location.
Import from Local¶
Import an item definition from a local directory into the workspace.
Import a notebook from Python file format instead of default format.
Supported Import Formats: .ipynb
(default) and .py
.
Start/Stop Mirrored Databases¶
Start Mirrored Database¶
Start data synchronization for a mirrored database.
Force Start Mirrored Database¶
Start mirrored database without confirmation.
Stop Mirrored Database¶
Stop data synchronization for a mirrored database.
Force Stop Mirrored Database¶
Stop mirrored database without confirmation.
Open in Browser¶
Open Item in Web Interface¶
Launch an item in the default web browser.