Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/added-20260403-104412.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: added
body: supports lakehouse import & export
time: 2026-04-03T10:44:12.4161434+03:00
custom:
Author: v-alexmoraru
AuthorLink: https://github.com/v-alexmoraru
5 changes: 2 additions & 3 deletions src/fabric_cli/commands/fs/impor/fab_fs_import_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ def import_single_item(item: Item, args: Namespace) -> None:
args.ws_id = item.workspace.id
input_path = utils_storage.get_import_path(args.input)

# Input path only support from local directories
if input_path["type"] == "lakehouse":
if input_path["type"] != "local":
raise FabricCLIError(
"Import from Lakehouse/Files not supported",
f"Import only supports local paths. Unsupported input path type: '{input_path['type']}'.",
fab_constant.ERROR_NOT_SUPPORTED,
)

Expand Down
2 changes: 2 additions & 0 deletions src/fabric_cli/core/fab_config/command_support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ commands:
- user_data_function
- graph_query_set
- map
- lakehouse
import:
supported_items:
- report
Expand All @@ -280,6 +281,7 @@ commands:
- cosmos_db_database
- user_data_function
- map
- lakehouse
unsupported_items:
- graph_query_set
get:
Expand Down
21 changes: 13 additions & 8 deletions tests/test_commands/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION, ItemType.LAKEHOUSE
])

import_create_new_item_success_params = pytest.mark.parametrize("item_type", [
ItemType.NOTEBOOK, ItemType.SPARK_JOB_DEFINITION, ItemType.DATA_PIPELINE,
ItemType.REPORT, ItemType.SEMANTIC_MODEL, ItemType.KQL_DATABASE,
ItemType.KQL_QUERYSET, ItemType.EVENTHOUSE, ItemType.MIRRORED_DATABASE,
ItemType.REFLEX, ItemType.KQL_DASHBOARD, ItemType.SQL_DATABASE,
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION, ItemType.LAKEHOUSE
])

import_create_new_item_fail_params = pytest.mark.parametrize("item_type", [
ItemType.DASHBOARD, ItemType.DATAMART, ItemType.LAKEHOUSE,
ItemType.DASHBOARD, ItemType.DATAMART,
ItemType.MIRRORED_WAREHOUSE, ItemType.ML_EXPERIMENT, ItemType.ML_MODEL,
ItemType.PAGINATED_REPORT, ItemType.SQL_ENDPOINT, ItemType.WAREHOUSE,
])
Expand All @@ -94,6 +94,7 @@
(ItemType.SPARK_JOB_DEFINITION),
(ItemType.SEMANTIC_MODEL),
(ItemType.DATA_PIPELINE),
(ItemType.LAKEHOUSE),
],
)

Expand Down Expand Up @@ -159,7 +160,7 @@
(ItemType.MIRRORED_DATABASE, True),
(ItemType.NOTEBOOK, True),
(ItemType.DATA_PIPELINE, True),
(ItemType.LAKEHOUSE, False),
(ItemType.LAKEHOUSE, True),
(ItemType.ENVIRONMENT, False),
(ItemType.WAREHOUSE, False),
(ItemType.COSMOS_DB_DATABASE, True),
Expand Down Expand Up @@ -243,7 +244,8 @@
(ItemType.COSMOS_DB_DATABASE, ".json"),
(ItemType.USER_DATA_FUNCTION, ".json"),
(ItemType.GRAPH_QUERY_SET, ".json"),
(ItemType.MAP, ".json")
(ItemType.MAP, ".json"),
(ItemType.LAKEHOUSE, ".json")
])

export_item_types_parameters = pytest.mark.parametrize("item_type", [
Expand All @@ -257,7 +259,8 @@
ItemType.COSMOS_DB_DATABASE,
ItemType.USER_DATA_FUNCTION,
ItemType.GRAPH_QUERY_SET,
ItemType.MAP
ItemType.MAP,
ItemType.LAKEHOUSE
])

export_item_format_parameters = pytest.mark.parametrize(
Expand All @@ -282,7 +285,8 @@
(ItemType.KQL_DATABASE, 3),
(ItemType.COSMOS_DB_DATABASE, 2),
(ItemType.USER_DATA_FUNCTION, 2),
(ItemType.GRAPH_QUERY_SET, 2)
(ItemType.GRAPH_QUERY_SET, 2),
(ItemType.LAKEHOUSE, 4)
])

export_item_invalid_format_parameters = pytest.mark.parametrize("item_type,invalid_format", [
Expand All @@ -293,7 +297,8 @@
(ItemType.MIRRORED_DATABASE, ".txt"),
(ItemType.COSMOS_DB_DATABASE, ".txt"),
(ItemType.USER_DATA_FUNCTION, ".txt"),
(ItemType.GRAPH_QUERY_SET, ".txt")
(ItemType.GRAPH_QUERY_SET, ".txt"),
(ItemType.LAKEHOUSE, ".txt")
])

# TODO: Fix capacity teardown issue CannotOverwriteExistingCassetteException & uncomment the item parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (mv; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
Comment thread
v-alexmoraru marked this conversation as resolved.
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -26,15 +26,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1559'
- '1596'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:11 GMT
- Thu, 26 Mar 2026 07:49:47 GMT
Pragma:
- no-cache
RequestId:
- 5125a79d-0336-454a-86ba-9dc40f57d5f9
- 76b94cb6-8e6c-4786-9a3e-b54b72f03227
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -60,7 +60,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (mv; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -75,15 +75,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1559'
- '1596'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:12 GMT
- Thu, 26 Mar 2026 07:49:48 GMT
Pragma:
- no-cache
RequestId:
- 92c0b299-6deb-45eb-a324-392c5667020e
- 27798644-da22-4fc1-9d5d-32e69c22d346
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -109,7 +109,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (mv; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
Expand All @@ -125,15 +125,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '424'
- '425'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:16 GMT
- Thu, 26 Mar 2026 07:50:00 GMT
Pragma:
- no-cache
RequestId:
- 7b72ff3c-b864-493d-848e-f0ba3cd46000
- 9a3fffad-0a7f-469d-ab93-679a1cfebecc
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (mv; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "6de67157-a78a-48e1-a47b-cf27e1d92fb1", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "306da8eb-88bb-4168-9d78-e1037058045a", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -181,13 +181,13 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:22 GMT
- Thu, 26 Mar 2026 07:50:15 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/6de67157-a78a-48e1-a47b-cf27e1d92fb1
- https://api.fabric.microsoft.com/v1/workspaces/306da8eb-88bb-4168-9d78-e1037058045a
Pragma:
- no-cache
RequestId:
- d87e8a2d-b226-403d-85d5-f4227550e5fc
- 903eefa7-889c-47bc-90d1-2feff6b09260
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
Comment thread
v-alexmoraru marked this conversation as resolved.
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "6de67157-a78a-48e1-a47b-cf27e1d92fb1",
"My workspace", "description": "", "type": "Personal"}, {"id": "306da8eb-88bb-4168-9d78-e1037058045a",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,15 +230,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1593'
- '1629'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:56 GMT
- Thu, 26 Mar 2026 07:50:32 GMT
Pragma:
- no-cache
RequestId:
- 9aa02954-cae9-4bfb-940a-fb2ec5e623e9
- aeb66fb2-3495-4aa5-b1ed-8d6cb62cdcf0
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -264,9 +264,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
Comment thread
v-alexmoraru marked this conversation as resolved.
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/6de67157-a78a-48e1-a47b-cf27e1d92fb1/items
uri: https://api.fabric.microsoft.com/v1/workspaces/306da8eb-88bb-4168-9d78-e1037058045a/items
response:
body:
string: '{"value": []}'
Expand All @@ -282,11 +282,11 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 19 Mar 2026 09:13:58 GMT
- Thu, 26 Mar 2026 07:50:33 GMT
Pragma:
- no-cache
RequestId:
- 858ce9ed-8f34-4ba7-a4a3-0ed1847b08e2
- e63ea8e3-de1d-4b41-b3f5-b8da01f223f0
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -314,9 +314,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.4.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.5.0 (export; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/6de67157-a78a-48e1-a47b-cf27e1d92fb1
uri: https://api.fabric.microsoft.com/v1/workspaces/306da8eb-88bb-4168-9d78-e1037058045a
response:
body:
string: ''
Expand All @@ -332,11 +332,11 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Thu, 19 Mar 2026 09:13:58 GMT
- Thu, 26 Mar 2026 07:50:33 GMT
Pragma:
- no-cache
RequestId:
- 5785f70d-b772-4f6d-83d1-4d201692605e
- 2c9dcb7e-efa5-466e-9aaa-3acb8f7e0dce
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down
Loading
Loading