Skip to content
Draft
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
29 changes: 25 additions & 4 deletions src/fabric_cli/core/fab_config/command_support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ commands:
- gateway
- sql_database
- graph_ql_api
- cosmos_db_database
- user_data_function
- graph_query_set
rm:
supported_elements:
- tenant
Expand Down Expand Up @@ -142,7 +145,6 @@ commands:
- retail_data_manager
- healthcare_data_solution
- sustainability_data_solution
- user_data_function
- ai_skill
mv:
supported_elements:
Expand All @@ -160,6 +162,7 @@ commands:
# - eventhouse
# - kql_database
- mirrored_database
- cosmos_db_database
- reflex
# - eventstream
- mounted_data_factory
Expand All @@ -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
Expand All @@ -186,6 +192,7 @@ commands:
# - eventhouse
# - kql_database
- mirrored_database
- cosmos_db_database
- reflex
# - eventstream
- mounted_data_factory
Expand All @@ -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
Expand Down Expand Up @@ -246,6 +255,9 @@ commands:
- graph_ql_api
- dataflow
- sql_database
- cosmos_db_database
- user_data_function
- graph_query_set
import:
supported_items:
- report
Expand All @@ -267,6 +279,9 @@ commands:
- graph_ql_api
- dataflow
- sql_database
- cosmos_db_database
- user_data_function
- graph_query_set
get:
supported_elements:
- workspace
Expand All @@ -281,6 +296,9 @@ commands:
- connection
- gateway
- external_data_share
- cosmos_db_database
- user_data_function
- graph_query_set
unsupported_items:
- dashboard
- paginated_report
Expand All @@ -294,7 +312,6 @@ commands:
- retail_data_manager
- healthcare_data_solution
- sustainability_data_solution
- user_data_function
- ai_skill
set:
supported_elements:
Expand All @@ -308,6 +325,9 @@ commands:
- domain
- connection
- gateway
- cosmos_db_database
- user_data_function
- graph_query_set
unsupported_items:
- dashboard
- paginated_report
Expand All @@ -321,7 +341,6 @@ commands:
- retail_data_manager
- healthcare_data_solution
- sustainability_data_solution
- user_data_function
- ai_skill
open:
supported_elements:
Expand All @@ -342,6 +361,9 @@ commands:
- connection
- gateway
- external_data_share
- cosmos_db_database
- user_data_function
- graph_query_set
unsupported_items:
- dashboard
- paginated_report
Expand All @@ -355,7 +377,6 @@ commands:
- retail_data_manager
- healthcare_data_solution
- sustainability_data_solution
- user_data_function
- ai_skill
start:
supported_items:
Expand Down
21 changes: 16 additions & 5 deletions src/fabric_cli/core/fab_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


##################################
Expand Down Expand Up @@ -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,
)

Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
}
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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": ""},
}
6 changes: 5 additions & 1 deletion src/fabric_cli/core/hiearchy/fab_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down Expand Up @@ -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),
Expand Down
Loading