Skip to content

[FEATURE] support item-definition for lakehouse items #106

@Guust-Franssens

Description

@Guust-Franssens

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
    # 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
    ):

Metadata

Metadata

Labels

enhancementNew feature or requestneeds triageThis is a new issue that needs to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions