From a1c58225ec931fd1c8b48cd0acf33e567299c026 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Tue, 27 Jan 2026 11:18:51 +0000 Subject: [PATCH 1/8] Support new item types --- .../core/fab_config/command_support.yaml | 29 ++++++++++++++++--- src/fabric_cli/core/fab_types.py | 21 ++++++++++---- src/fabric_cli/core/hiearchy/fab_item.py | 6 +++- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/fabric_cli/core/fab_config/command_support.yaml b/src/fabric_cli/core/fab_config/command_support.yaml index 1d147838..6ea030b8 100644 --- a/src/fabric_cli/core/fab_config/command_support.yaml +++ b/src/fabric_cli/core/fab_config/command_support.yaml @@ -113,6 +113,9 @@ commands: - gateway - sql_database - graph_ql_api + - cosmos_db_database + - user_data_function + - graph_query_set rm: supported_elements: - tenant @@ -142,7 +145,6 @@ commands: - retail_data_manager - healthcare_data_solution - sustainability_data_solution - - user_data_function - ai_skill mv: supported_elements: @@ -160,6 +162,7 @@ commands: # - eventhouse # - kql_database - mirrored_database + - cosmos_db_database - reflex # - eventstream - mounted_data_factory @@ -169,6 +172,9 @@ commands: #- lakehouse # this is included just to support underlying /Files - dataflow - sql_database + - cosmos_database + - user_data_function + - graph_query_set cp: supported_elements: - workspace @@ -186,6 +192,7 @@ commands: # - eventhouse # - kql_database - mirrored_database + - cosmos_db_database - reflex # - eventstream - mounted_data_factory @@ -195,6 +202,8 @@ commands: #- lakehouse # this is included just to support underlying /Files - dataflow - sql_database + - user_data_function + - graph_query_set ln: supported_elements: - onelake @@ -246,6 +255,9 @@ commands: - graph_ql_api - dataflow - sql_database + - cosmos_db_database + - user_data_function + - graph_query_set import: supported_items: - report @@ -267,6 +279,9 @@ commands: - graph_ql_api - dataflow - sql_database + - cosmos_db_database + - user_data_function + - graph_query_set get: supported_elements: - workspace @@ -281,6 +296,9 @@ commands: - connection - gateway - external_data_share + - cosmos_db_database + - user_data_function + - graph_query_set unsupported_items: - dashboard - paginated_report @@ -294,7 +312,6 @@ commands: - retail_data_manager - healthcare_data_solution - sustainability_data_solution - - user_data_function - ai_skill set: supported_elements: @@ -308,6 +325,9 @@ commands: - domain - connection - gateway + - cosmos_db_database + - user_data_function + - graph_query_set unsupported_items: - dashboard - paginated_report @@ -321,7 +341,6 @@ commands: - retail_data_manager - healthcare_data_solution - sustainability_data_solution - - user_data_function - ai_skill open: supported_elements: @@ -342,6 +361,9 @@ commands: - connection - gateway - external_data_share + - cosmos_db_database + - user_data_function + - graph_query_set unsupported_items: - dashboard - paginated_report @@ -355,7 +377,6 @@ commands: - retail_data_manager - healthcare_data_solution - sustainability_data_solution - - user_data_function - ai_skill start: supported_items: diff --git a/src/fabric_cli/core/fab_types.py b/src/fabric_cli/core/fab_types.py index bcd8c7d2..f1e1ffb2 100644 --- a/src/fabric_cli/core/fab_types.py +++ b/src/fabric_cli/core/fab_types.py @@ -140,7 +140,8 @@ def from_string(cls, vws_type_str): class _BaseItemType(Enum): @classmethod def from_string(cls, item_type_str): - raise NotImplementedError("This method must be implemented in the subclass") + raise NotImplementedError( + "This method must be implemented in the subclass") ################################## @@ -199,7 +200,8 @@ def from_string(cls, vws_type_str): if item.value.lower() == vws_type_str.lower(): return item raise FabricCLIError( - ErrorMessages.Common.invalid_virtual_item_container_type(vws_type_str), + ErrorMessages.Common.invalid_virtual_item_container_type( + vws_type_str), fab_constant.ERROR_INVALID_ITEM_TYPE, ) @@ -253,10 +255,10 @@ class ItemType(_BaseItemType): METRIC_SET = "MetricSet" ORG_APP = "OrgApp" SUSTAINABILITY_DATA_SOLUTION = "SustainabilityDataSolution" - USER_DATA_FUNCTION = "UserDataFunction" VARIABLE_LIBRARY = "VariableLibrary" # API + COSMOS_DATABASE = "CosmosDBDatabase" DASHBOARD = "Dashboard" DATAMART = "Datamart" DATA_PIPELINE = "DataPipeline" @@ -281,6 +283,8 @@ class ItemType(_BaseItemType): WAREHOUSE = "Warehouse" COPYJOB = "CopyJob" GRAPHQLAPI = "GraphQLApi" + GRAPH_QUERY_SET = "GraphQuerySet" + USER_DATA_FUNCTION = "UserDataFunction" MOUNTED_DATA_FACTORY = "MountedDataFactory" SQL_DATABASE = "SQLDatabase" DATAFLOW = "Dataflow" @@ -482,9 +486,9 @@ class MirroredDatabaseFolders(Enum): ItemType.SUSTAINABILITY_DATA_SOLUTION: "sustainabilitydatasolutions", ItemType.METRIC_SET: "metricsets", ItemType.ORG_APP: "orgapps", - ItemType.USER_DATA_FUNCTION: "userdatafunctions", ItemType.VARIABLE_LIBRARY: "variablelibraries", # API + ItemType.COSMOS_DATABASE: "cosmosDbDatabases", ItemType.DASHBOARD: "dashboards", ItemType.DATA_PIPELINE: "dataPipelines", ItemType.DATAMART: "datamarts", @@ -510,6 +514,8 @@ class MirroredDatabaseFolders(Enum): ItemType.WAREHOUSE: "warehouses", ItemType.COPYJOB: "copyJobs", ItemType.GRAPHQLAPI: "graphqlapis", + ItemType.GRAPH_QUERY_SET: "GraphQuerySets", + ItemType.USER_DATA_FUNCTION: "userdatafunctions", ItemType.MOUNTED_DATA_FACTORY: "mounteddatafactories", ItemType.DATAFLOW: "dataflows", } @@ -526,9 +532,9 @@ class MirroredDatabaseFolders(Enum): ItemType.SUSTAINABILITY_DATA_SOLUTION: "sustainability-data-manager", ItemType.METRIC_SET: "metricsets", ItemType.ORG_APP: "orgapps", - ItemType.USER_DATA_FUNCTION: "userdatafunctions", ItemType.VARIABLE_LIBRARY: "variable-libraries", # API + ItemType.COSMOS_DATABASE: "cosmosdbdatabases", ItemType.DASHBOARD: "dashboards", ItemType.DATAMART: "datamarts", ItemType.DATA_PIPELINE: "pipelines", @@ -552,6 +558,8 @@ class MirroredDatabaseFolders(Enum): ItemType.SQL_ENDPOINT: "lakewarehouses", ItemType.WAREHOUSE: "datawarehouses", ItemType.COPYJOB: "copyjobs", + ItemType.GRAPH_QUERY_SET: "graph-queryset", + ItemType.USER_DATA_FUNCTION: "userdatafunctions", ItemType.GRAPHQLAPI: "graphql", ItemType.MOUNTED_DATA_FACTORY: "mounteddatafactories", ItemType.DATAFLOW: "dataflows-gen2", @@ -566,4 +574,7 @@ class MirroredDatabaseFolders(Enum): ".py": "?format=fabricGitSource", ".ipynb": "?format=ipynb", }, + ItemType.COSMOS_DATABASE: {"default": ""}, + ItemType.USER_DATA_FUNCTION: {"default": ""}, + ItemType.GRAPH_QUERY_SET: {"default": ""}, } diff --git a/src/fabric_cli/core/hiearchy/fab_item.py b/src/fabric_cli/core/hiearchy/fab_item.py index e246f49f..26e9dbb2 100644 --- a/src/fabric_cli/core/hiearchy/fab_item.py +++ b/src/fabric_cli/core/hiearchy/fab_item.py @@ -39,7 +39,8 @@ def item_type(self) -> ItemType: return _item_type else: raise FabricCLIError( - ErrorMessages.Hierarchy.item_type_not_valid(str(super().item_type)), + ErrorMessages.Hierarchy.item_type_not_valid( + str(super().item_type)), fab_constant.ERROR_INVALID_ITEM_TYPE, ) @@ -119,6 +120,9 @@ def get_payload(self, definition, input_format=None) -> dict: | ItemType.GRAPHQLAPI | ItemType.DATAFLOW | ItemType.SQL_DATABASE + | ItemType.COSMOS_DATABASE + | ItemType.GRAPH_QUERY_SET + | ItemType.USER_DATA_FUNCTION ): return { "type": str(self.item_type), From 80fa8aa3282e12b6920bd1212fe3944ad1be6218 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Wed, 28 Jan 2026 10:00:27 +0000 Subject: [PATCH 2/8] Adds changelog --- .changes/unreleased/new-items-20260128-120006.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/new-items-20260128-120006.yaml diff --git a/.changes/unreleased/new-items-20260128-120006.yaml b/.changes/unreleased/new-items-20260128-120006.yaml new file mode 100644 index 00000000..6bb911d6 --- /dev/null +++ b/.changes/unreleased/new-items-20260128-120006.yaml @@ -0,0 +1,6 @@ +kind: new-items +body: Support for CosmosDB Database, User Data Function & Graph Query Set +time: 2026-01-28T12:00:06.840541+02:00 +custom: + Author: v-alexmoraru + AuthorLink: https://github.com/v-alexmoraru From 3ac76e5dfad294f9de81c781c07898c81103e7d7 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 10:45:03 +0000 Subject: [PATCH 3/8] Unsupports set & import for GQSet --- src/fabric_cli/core/fab_config/command_support.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fabric_cli/core/fab_config/command_support.yaml b/src/fabric_cli/core/fab_config/command_support.yaml index 6ea030b8..e82e5029 100644 --- a/src/fabric_cli/core/fab_config/command_support.yaml +++ b/src/fabric_cli/core/fab_config/command_support.yaml @@ -281,6 +281,7 @@ commands: - sql_database - cosmos_db_database - user_data_function + unsupported_items: - graph_query_set get: supported_elements: @@ -327,7 +328,6 @@ commands: - gateway - cosmos_db_database - user_data_function - - graph_query_set unsupported_items: - dashboard - paginated_report @@ -342,6 +342,7 @@ commands: - healthcare_data_solution - sustainability_data_solution - ai_skill + - graph_query_set open: supported_elements: - workspace From 0b7488ea2030482243b5e7129c3f453b8a84aad6 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 12:14:52 +0000 Subject: [PATCH 4/8] Updates supported commands --- .changes/unreleased/new-items-20260128-120006.yaml | 2 +- src/fabric_cli/core/fab_config/command_support.yaml | 6 +----- src/fabric_cli/core/fab_types.py | 8 ++++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.changes/unreleased/new-items-20260128-120006.yaml b/.changes/unreleased/new-items-20260128-120006.yaml index 6bb911d6..6c079745 100644 --- a/.changes/unreleased/new-items-20260128-120006.yaml +++ b/.changes/unreleased/new-items-20260128-120006.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Support for CosmosDB Database, User Data Function & Graph Query Set +body: Support for CosmosDB Database (mkdir, ls, get, set, rm, import, export), User Data Function (mkdir, get, set, rm, import, export) & Graph Query Set (mkdir, get, rm, export) time: 2026-01-28T12:00:06.840541+02:00 custom: Author: v-alexmoraru diff --git a/src/fabric_cli/core/fab_config/command_support.yaml b/src/fabric_cli/core/fab_config/command_support.yaml index e82e5029..1baafc97 100644 --- a/src/fabric_cli/core/fab_config/command_support.yaml +++ b/src/fabric_cli/core/fab_config/command_support.yaml @@ -112,9 +112,8 @@ commands: - connection - gateway - sql_database - - graph_ql_api - cosmos_db_database - - user_data_function + - graph_ql_api - graph_query_set rm: supported_elements: @@ -172,7 +171,6 @@ commands: #- lakehouse # this is included just to support underlying /Files - dataflow - sql_database - - cosmos_database - user_data_function - graph_query_set cp: @@ -326,8 +324,6 @@ commands: - domain - connection - gateway - - cosmos_db_database - - user_data_function unsupported_items: - dashboard - paginated_report diff --git a/src/fabric_cli/core/fab_types.py b/src/fabric_cli/core/fab_types.py index f1e1ffb2..41048fc4 100644 --- a/src/fabric_cli/core/fab_types.py +++ b/src/fabric_cli/core/fab_types.py @@ -258,7 +258,7 @@ class ItemType(_BaseItemType): VARIABLE_LIBRARY = "VariableLibrary" # API - COSMOS_DATABASE = "CosmosDBDatabase" + COSMOS_DB_DATABASE = "CosmosDBDatabase" DASHBOARD = "Dashboard" DATAMART = "Datamart" DATA_PIPELINE = "DataPipeline" @@ -488,7 +488,7 @@ class MirroredDatabaseFolders(Enum): ItemType.ORG_APP: "orgapps", ItemType.VARIABLE_LIBRARY: "variablelibraries", # API - ItemType.COSMOS_DATABASE: "cosmosDbDatabases", + ItemType.COSMOS_DB_DATABASE: "cosmosDbDatabases", ItemType.DASHBOARD: "dashboards", ItemType.DATA_PIPELINE: "dataPipelines", ItemType.DATAMART: "datamarts", @@ -534,7 +534,7 @@ class MirroredDatabaseFolders(Enum): ItemType.ORG_APP: "orgapps", ItemType.VARIABLE_LIBRARY: "variable-libraries", # API - ItemType.COSMOS_DATABASE: "cosmosdbdatabases", + ItemType.COSMOS_DB_DATABASE: "cosmosdbdatabases", ItemType.DASHBOARD: "dashboards", ItemType.DATAMART: "datamarts", ItemType.DATA_PIPELINE: "pipelines", @@ -574,7 +574,7 @@ class MirroredDatabaseFolders(Enum): ".py": "?format=fabricGitSource", ".ipynb": "?format=ipynb", }, - ItemType.COSMOS_DATABASE: {"default": ""}, + ItemType.COSMOS_DB_DATABASE: {"default": ""}, ItemType.USER_DATA_FUNCTION: {"default": ""}, ItemType.GRAPH_QUERY_SET: {"default": ""}, } From 42fda69bdef2ede1d2e004558a5c9542eef0ca8d Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 12:18:25 +0000 Subject: [PATCH 5/8] Typo fix --- src/fabric_cli/core/hiearchy/fab_item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fabric_cli/core/hiearchy/fab_item.py b/src/fabric_cli/core/hiearchy/fab_item.py index 26e9dbb2..47d2106e 100644 --- a/src/fabric_cli/core/hiearchy/fab_item.py +++ b/src/fabric_cli/core/hiearchy/fab_item.py @@ -120,7 +120,7 @@ def get_payload(self, definition, input_format=None) -> dict: | ItemType.GRAPHQLAPI | ItemType.DATAFLOW | ItemType.SQL_DATABASE - | ItemType.COSMOS_DATABASE + | ItemType.COSMOS_DB_DATABASE | ItemType.GRAPH_QUERY_SET | ItemType.USER_DATA_FUNCTION ): From c224e2d70241f01e941b184ae1808d9096894070 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 12:34:33 +0000 Subject: [PATCH 6/8] Changelog & commands update --- .changes/unreleased/new-items-20260128-120006.yaml | 2 +- .changes/unreleased/new-items-20260129-143011.yaml | 6 ++++++ .changes/unreleased/new-items-20260129-143030.yaml | 6 ++++++ src/fabric_cli/core/fab_config/command_support.yaml | 4 ---- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .changes/unreleased/new-items-20260129-143011.yaml create mode 100644 .changes/unreleased/new-items-20260129-143030.yaml diff --git a/.changes/unreleased/new-items-20260128-120006.yaml b/.changes/unreleased/new-items-20260128-120006.yaml index 6c079745..857767f0 100644 --- a/.changes/unreleased/new-items-20260128-120006.yaml +++ b/.changes/unreleased/new-items-20260128-120006.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Support for CosmosDB Database (mkdir, ls, get, set, rm, import, export), User Data Function (mkdir, get, set, rm, import, export) & Graph Query Set (mkdir, get, rm, export) +body: Support for CosmosDB Database (mkdir, ls, get, set, rm, import, export) time: 2026-01-28T12:00:06.840541+02:00 custom: Author: v-alexmoraru diff --git a/.changes/unreleased/new-items-20260129-143011.yaml b/.changes/unreleased/new-items-20260129-143011.yaml new file mode 100644 index 00000000..e2dc3475 --- /dev/null +++ b/.changes/unreleased/new-items-20260129-143011.yaml @@ -0,0 +1,6 @@ +kind: new-items +body: Support for User Data Function (mkdir, get, set, rm, import, export) +time: 2026-01-29T14:30:11.9516836+02:00 +custom: + Author: v-alexmoraru + AuthorLink: https://github.com/v-alexmoraru diff --git a/.changes/unreleased/new-items-20260129-143030.yaml b/.changes/unreleased/new-items-20260129-143030.yaml new file mode 100644 index 00000000..e0f0df5e --- /dev/null +++ b/.changes/unreleased/new-items-20260129-143030.yaml @@ -0,0 +1,6 @@ +kind: new-items +body: Support for Graph Query Set (mkdir, get, rm, export) +time: 2026-01-29T14:30:30.9936987+02:00 +custom: + Author: v-alexmoraru + AuthorLink: https://github.com/v-alexmoraru diff --git a/src/fabric_cli/core/fab_config/command_support.yaml b/src/fabric_cli/core/fab_config/command_support.yaml index 1baafc97..cd45bed8 100644 --- a/src/fabric_cli/core/fab_config/command_support.yaml +++ b/src/fabric_cli/core/fab_config/command_support.yaml @@ -114,7 +114,6 @@ commands: - sql_database - cosmos_db_database - graph_ql_api - - graph_query_set rm: supported_elements: - tenant @@ -358,9 +357,6 @@ commands: - connection - gateway - external_data_share - - cosmos_db_database - - user_data_function - - graph_query_set unsupported_items: - dashboard - paginated_report From b268cf2782ddb598a8999f9dd178261b4f294b2e Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 13:24:54 +0000 Subject: [PATCH 7/8] Small updates --- .changes/unreleased/new-items-20260128-120006.yaml | 2 +- .changes/unreleased/new-items-20260129-143011.yaml | 2 +- .changes/unreleased/new-items-20260129-143030.yaml | 2 +- src/fabric_cli/core/fab_config/command_support.yaml | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.changes/unreleased/new-items-20260128-120006.yaml b/.changes/unreleased/new-items-20260128-120006.yaml index 857767f0..a07292cc 100644 --- a/.changes/unreleased/new-items-20260128-120006.yaml +++ b/.changes/unreleased/new-items-20260128-120006.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Support for CosmosDB Database (mkdir, ls, get, set, rm, import, export) +body: Add support of CosmosDBDatabase item type in mkdir, get, set, rm, ls, cp, mv, import and export commands time: 2026-01-28T12:00:06.840541+02:00 custom: Author: v-alexmoraru diff --git a/.changes/unreleased/new-items-20260129-143011.yaml b/.changes/unreleased/new-items-20260129-143011.yaml index e2dc3475..26711cdb 100644 --- a/.changes/unreleased/new-items-20260129-143011.yaml +++ b/.changes/unreleased/new-items-20260129-143011.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Support for User Data Function (mkdir, get, set, rm, import, export) +body: Add support of UserDataFunction item type in mkdir, get, set, rm, ls, cp, mv, import and export commands time: 2026-01-29T14:30:11.9516836+02:00 custom: Author: v-alexmoraru diff --git a/.changes/unreleased/new-items-20260129-143030.yaml b/.changes/unreleased/new-items-20260129-143030.yaml index e0f0df5e..4c013950 100644 --- a/.changes/unreleased/new-items-20260129-143030.yaml +++ b/.changes/unreleased/new-items-20260129-143030.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Support for Graph Query Set (mkdir, get, rm, export) +body: Add support of UserDataFunction item type in mkdir, get, rm and export commands time: 2026-01-29T14:30:30.9936987+02:00 custom: Author: v-alexmoraru diff --git a/src/fabric_cli/core/fab_config/command_support.yaml b/src/fabric_cli/core/fab_config/command_support.yaml index cd45bed8..822aa980 100644 --- a/src/fabric_cli/core/fab_config/command_support.yaml +++ b/src/fabric_cli/core/fab_config/command_support.yaml @@ -171,7 +171,6 @@ commands: - dataflow - sql_database - user_data_function - - graph_query_set cp: supported_elements: - workspace @@ -200,7 +199,6 @@ commands: - dataflow - sql_database - user_data_function - - graph_query_set ln: supported_elements: - onelake From 83c88de5e4f1cf0b27c2344715ef4ff6e4047a37 Mon Sep 17 00:00:00 2001 From: Alex Moraru Date: Thu, 29 Jan 2026 13:28:24 +0000 Subject: [PATCH 8/8] Typo --- .changes/unreleased/new-items-20260129-143011.yaml | 2 +- .changes/unreleased/new-items-20260129-143030.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changes/unreleased/new-items-20260129-143011.yaml b/.changes/unreleased/new-items-20260129-143011.yaml index 26711cdb..df20fe39 100644 --- a/.changes/unreleased/new-items-20260129-143011.yaml +++ b/.changes/unreleased/new-items-20260129-143011.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Add support of UserDataFunction item type in mkdir, get, set, rm, ls, cp, mv, import and export commands +body: Add support of UserDataFunction item type in mkdir, get, set, rm, cp, mv, import and export commands time: 2026-01-29T14:30:11.9516836+02:00 custom: Author: v-alexmoraru diff --git a/.changes/unreleased/new-items-20260129-143030.yaml b/.changes/unreleased/new-items-20260129-143030.yaml index 4c013950..16f2fa60 100644 --- a/.changes/unreleased/new-items-20260129-143030.yaml +++ b/.changes/unreleased/new-items-20260129-143030.yaml @@ -1,5 +1,5 @@ kind: new-items -body: Add support of UserDataFunction item type in mkdir, get, rm and export commands +body: Add support of GraphQuerySet item type in mkdir, get, rm and export commands time: 2026-01-29T14:30:30.9936987+02:00 custom: Author: v-alexmoraru