@@ -22,7 +22,7 @@ def query_kusto(
2222 Parameters
2323 ----------
2424 query : str
25- The KQL query .
25+ The query (supports KQL or SQL - make sure to specify the language parameter accordingly) .
2626 kql_database : str | uuid.UUID
2727 The KQL database name or ID.
2828 workspace : str | uuid.UUID, default=None
@@ -40,9 +40,10 @@ def query_kusto(
4040
4141 import notebookutils
4242
43+ language = language .lower ()
4344 if language not in ["kql" , "sql" ]:
4445 raise ValueError (
45- f"Invalid language '{ language } '. Only 'kql' and 'sql' are supported."
46+ f"{ icons . _red_dot } Invalid language '{ language } '. Only 'kql' and 'sql' are supported."
4647 )
4748
4849 cluster_uri = _resolve_cluster_uri (kql_database = kql_database , workspace = workspace )
@@ -107,12 +108,12 @@ def query_workspace_monitoring(
107108 query : str , workspace : Optional [str | UUID ] = None , language : str = "kql"
108109) -> pd .DataFrame :
109110 """
110- Runs a KQL query against the Fabric workspace monitoring database.
111+ Runs a query against the Fabric workspace monitoring database. Workspace monitoring must be enabled on the workspace to use this function .
111112
112113 Parameters
113114 ----------
114115 query : str
115- The KQL query .
116+ The query (supports KQL or SQL - make sure to specify the language parameter accordingly) .
116117 workspace : str | uuid.UUID, default=None
117118 The Fabric workspace name or ID.
118119 Defaults to None which resolves to the workspace of the attached lakehouse
@@ -123,7 +124,7 @@ def query_workspace_monitoring(
123124 Returns
124125 -------
125126 pandas.DataFrame
126- A pandas dataframe showing the result of the KQL query.
127+ A pandas dataframe showing the result of the query.
127128 """
128129
129130 return query_kusto (
0 commit comments