-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Use Case / Problem
Lakehouse item now supports item definition, this means that now the CLI should support import and export for lakehouse item_type.
This would simplify CI/CD scenarios where you are looping over a folder with Fabric items and deploying using the import command. Currently you need to separately handle the lakehouse item.
In addition the current error message for non-supported import items isn't super clear.
fab import ws1.workspace/lh1.lakehouse -i ./src/lh1.Lakehouse/
x import: [UnsupportedCommand] not supported for command 'import'Proposed Solution
Remove code restriction on import and export for lakehouses as it is now supported.
Alternatives Considered
Current workaround is to check the item type when deploying from a folder and if type == "lakehouse" then use mkdir instead. However it would be better to use import as then you can use the full definition
Impact Assessment
- This would help me personally
- This would help my team/organization
- This would help the broader fabric-cli community
- This aligns with Microsoft Fabric roadmap items
Implementation Attestation
- I understand this feature should maintain backward compatibility with existing commands
- I confirm this feature request does not introduce performance regressions for existing workflows
- I acknowledge that new features must follow fabric-cli's established patterns and conventions
Implementation Notes
I have made the following minor changes locally and to make the import for lakehouse works:
- removed
fabric-cli/src/fabric_cli/commands/fs/impor/fab_fs_import_item.py
Lines 32 to 37 in 1fce5c0
# Input path only support from local directories if input_path["type"] == "lakehouse": raise FabricCLIError( "Import from Lakehouse/Files not supported", fab_constant.ERROR_NOT_SUPPORTED, ) - added lakehouse here
fabric-cli/src/fabric_cli/core/fab_config/command_support.yaml
Lines 249 to 269 in 1fce5c0
import: supported_items: - report - spark_job_definition - semantic_model - notebook - kql_dashboard - data_pipeline - kql_queryset - eventhouse - kql_database - mirrored_database - reflex - eventstream - mounted_data_factory - environment - copy_job - variable_library - graph_ql_api - dataflow - sql_database
and here
fabric-cli/src/fabric_cli/core/hiearchy/fab_item.py
Lines 105 to 122 in 1fce5c0
case ( ItemType.REPORT | ItemType.SEMANTIC_MODEL | ItemType.KQL_DASHBOARD | ItemType.DATA_PIPELINE | ItemType.KQL_QUERYSET | ItemType.EVENTHOUSE | ItemType.KQL_DATABASE | ItemType.MIRRORED_DATABASE | ItemType.REFLEX | ItemType.EVENTSTREAM | ItemType.MOUNTED_DATA_FACTORY | ItemType.COPYJOB | ItemType.VARIABLE_LIBRARY | ItemType.GRAPHQLAPI | ItemType.DATAFLOW | ItemType.SQL_DATABASE ):