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
Implementation Attestation
Implementation Notes
I have made the following minor changes locally and to make the import for lakehouse works:
- removed
|
# 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
|
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
|
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 |
|
): |
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.
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 usemkdirinstead. However it would be better to use import as then you can use the full definitionImpact Assessment
Implementation Attestation
Implementation Notes
I have made the following minor changes locally and to make the import for lakehouse works:
fabric-cli/src/fabric_cli/commands/fs/impor/fab_fs_import_item.py
Lines 32 to 37 in 1fce5c0
fabric-cli/src/fabric_cli/core/fab_config/command_support.yaml
Lines 249 to 269 in 1fce5c0
and here
fabric-cli/src/fabric_cli/core/hiearchy/fab_item.py
Lines 105 to 122 in 1fce5c0