diff --git a/src/sempy_labs/_managed_private_endpoints.py b/src/sempy_labs/_managed_private_endpoints.py index 6253111..dcb9846 100644 --- a/src/sempy_labs/_managed_private_endpoints.py +++ b/src/sempy_labs/_managed_private_endpoints.py @@ -27,13 +27,13 @@ def create_managed_private_endpoint( ---------- name: str Name of the managed private endpoint. - target_private_link_resource_id: UUID + target_private_link_resource_id: uuid.UUID Resource Id of data source for which private endpoint needs to be created. target_subresource_type : str Sub-resource pointing to Private-link resoure. request_message : str, default=None Message to approve private endpoint request. Should not be more than 140 characters. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -76,7 +76,7 @@ def list_managed_private_endpoints( Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -137,7 +137,7 @@ def delete_managed_private_endpoint( ---------- managed_private_endpoint: str Name of the managed private endpoint. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_mirrored_databases.py b/src/sempy_labs/_mirrored_databases.py index b30e9b4..e6a7fcf 100644 --- a/src/sempy_labs/_mirrored_databases.py +++ b/src/sempy_labs/_mirrored_databases.py @@ -21,7 +21,7 @@ def list_mirrored_databases(workspace: Optional[str | UUID] = None) -> pd.DataFr Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -86,7 +86,7 @@ def create_mirrored_database( Name of the mirrored database. description : str, default=None A description of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -124,7 +124,7 @@ def delete_mirrored_database( ---------- mirrored_database: str Name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -161,7 +161,7 @@ def get_mirroring_status( ---------- mirrored_database: str Name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -201,7 +201,7 @@ def get_tables_mirroring_status( ---------- mirrored_database: str Name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -270,7 +270,7 @@ def start_mirroring(mirrored_database: str, workspace: Optional[str | UUID] = No ---------- mirrored_database: str Name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -305,7 +305,7 @@ def stop_mirroring(mirrored_database: str, workspace: Optional[str | UUID] = Non ---------- mirrored_database: str Name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -342,7 +342,7 @@ def get_mirrored_database_definition( ---------- mirrored_database : str The name of the mirrored database. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -392,7 +392,7 @@ def update_mirrored_database_definition( The name of the mirrored database to be created. mirrored_database_content : dict The mirrored database definition (not in Base64 format). - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_mirrored_warehouses.py b/src/sempy_labs/_mirrored_warehouses.py index f1d6de8..96bc1a7 100644 --- a/src/sempy_labs/_mirrored_warehouses.py +++ b/src/sempy_labs/_mirrored_warehouses.py @@ -17,7 +17,7 @@ def list_mirrored_warehouses(workspace: Optional[str | UUID] = None) -> pd.DataF Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_ml_experiments.py b/src/sempy_labs/_ml_experiments.py index 018b94f..e469093 100644 --- a/src/sempy_labs/_ml_experiments.py +++ b/src/sempy_labs/_ml_experiments.py @@ -19,7 +19,7 @@ def list_ml_experiments(workspace: Optional[str | UUID] = None) -> pd.DataFrame: Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -71,7 +71,7 @@ def create_ml_experiment( Name of the ML experiment. description : str, default=None A description of the environment. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -106,7 +106,7 @@ def delete_ml_experiment(name: str, workspace: Optional[str | UUID] = None): ---------- name: str Name of the ML experiment. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_ml_models.py b/src/sempy_labs/_ml_models.py index 833d95e..c078f16 100644 --- a/src/sempy_labs/_ml_models.py +++ b/src/sempy_labs/_ml_models.py @@ -19,7 +19,7 @@ def list_ml_models(workspace: Optional[str | UUID] = None) -> pd.DataFrame: Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -71,7 +71,7 @@ def create_ml_model( Name of the ML model. description : str, default=None A description of the ML model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -104,7 +104,7 @@ def delete_ml_model(name: str, workspace: Optional[str | UUID] = None): ---------- name: str Name of the ML model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_model_bpa.py b/src/sempy_labs/_model_bpa.py index 6962306..d6cc808 100644 --- a/src/sempy_labs/_model_bpa.py +++ b/src/sempy_labs/_model_bpa.py @@ -43,12 +43,12 @@ def run_model_bpa( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. rules : pandas.DataFrame, default=None A pandas dataframe containing rules to be evaluated. - workspace : str, default=None - The Fabric workspace name. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. export : bool, default=False diff --git a/src/sempy_labs/_model_dependencies.py b/src/sempy_labs/_model_dependencies.py index 102d99a..d0dc653 100644 --- a/src/sempy_labs/_model_dependencies.py +++ b/src/sempy_labs/_model_dependencies.py @@ -21,9 +21,9 @@ def get_measure_dependencies( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -149,10 +149,10 @@ def get_model_calc_dependencies( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str, default=None - The Fabric workspace name. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -241,11 +241,11 @@ def measure_dependency_tree( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. measure_name : str Name of the measure. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_notebooks.py b/src/sempy_labs/_notebooks.py index 49f5b60..ffc8dc2 100644 --- a/src/sempy_labs/_notebooks.py +++ b/src/sempy_labs/_notebooks.py @@ -63,7 +63,7 @@ def get_notebook_definition( ---------- notebook_name : str The name of the notebook. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -113,7 +113,7 @@ def import_notebook_from_web( description : str, default=None The description of the notebook. Defaults to None which does not place a description. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -176,7 +176,7 @@ def create_notebook( description : str, default=None The description of the notebook. Defaults to None which does not place a description. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -223,7 +223,7 @@ def update_notebook_definition( The name of the notebook to be updated. notebook_content : str The Jupyter notebook content (not in Base64 format). - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_one_lake_integration.py b/src/sempy_labs/_one_lake_integration.py index 94e0242..83ae369 100644 --- a/src/sempy_labs/_one_lake_integration.py +++ b/src/sempy_labs/_one_lake_integration.py @@ -13,7 +13,7 @@ @log def export_model_to_onelake( dataset: str | UUID, - workspace: Optional[str] = None, + workspace: Optional[str | UUID] = None, destination_lakehouse: Optional[str] = None, destination_workspace: Optional[str] = None, ): @@ -22,10 +22,10 @@ def export_model_to_onelake( Parameters ---------- - dataset : str - Name of the semantic model. - workspace : str, default=None - The Fabric workspace name. + dataset : str | uuid.UUID + Name or ID of the semantic model. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. destination_lakehouse : str, default=None diff --git a/src/sempy_labs/_query_scale_out.py b/src/sempy_labs/_query_scale_out.py index e6ff12c..6735ce5 100644 --- a/src/sempy_labs/_query_scale_out.py +++ b/src/sempy_labs/_query_scale_out.py @@ -1,7 +1,6 @@ import sempy.fabric as fabric import pandas as pd from sempy_labs._helper_functions import ( - resolve_dataset_id, resolve_workspace_name_and_id, resolve_dataset_name_and_id, ) @@ -19,9 +18,9 @@ def qso_sync(dataset: str | UUID, workspace: Optional[str | UUID] = None): Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -52,9 +51,9 @@ def qso_sync_status( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -151,9 +150,9 @@ def disable_qso( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -198,13 +197,13 @@ def set_qso( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. auto_sync : bool, default=True Whether the semantic model automatically syncs read-only replicas. max_read_only_replicas : int, default=-1 To enable semantic model scale-out, set max_read_only_replicas to -1, or any non-0 value. A value of -1 allows Power BI to create as many read-only replicas as your Power BI capacity supports. You can also explicitly set the replica count to a value lower than that of the capacity maximum. Setting max_read_only_replicas to -1 is recommended. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -268,11 +267,11 @@ def set_semantic_model_storage_format( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. storage_format : str The storage format for the semantic model. Valid options: 'Large', 'Small'. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -327,9 +326,9 @@ def list_qso_settings( Parameters ---------- - dataset : str | UUID, default=None + dataset : str | uuid.UUID, default=None Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -395,7 +394,7 @@ def set_workspace_default_storage_format( ---------- storage_format : str The storage format for the semantic model. Valid options: 'Large', 'Small'. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_refresh_semantic_model.py b/src/sempy_labs/_refresh_semantic_model.py index d35510b..1fb0327 100644 --- a/src/sempy_labs/_refresh_semantic_model.py +++ b/src/sempy_labs/_refresh_semantic_model.py @@ -26,7 +26,7 @@ def refresh_semantic_model( retry_count: int = 0, apply_refresh_policy: bool = True, max_parallelism: int = 10, - workspace: Optional[str] = None, + workspace: Optional[str | UUID] = None, visualize: bool = False, commit_mode: str = "transactional", ) -> pd.DataFrame | None: @@ -35,7 +35,7 @@ def refresh_semantic_model( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. tables : str, List[str], default=None A string or a list of tables to refresh. @@ -51,8 +51,8 @@ def refresh_semantic_model( Determines the maximum number of threads that can run the processing commands in parallel. This value aligns with the MaxParallelism property that can be set in the TMSL Sequence command or by using other methods. Defaults to 10. - workspace : str, default=None - The Fabric workspace name. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. visualize : bool, default=False @@ -286,12 +286,12 @@ def cancel_dataset_refresh( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. request_id : str, default=None The request id of a semantic model refresh. Defaults to finding the latest active refresh of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -336,12 +336,12 @@ def get_semantic_model_refresh_history( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. request_id : str, default=None The request id of a semantic model refresh. Defaults to None which resolves to showing all refresh requests for the given semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_spark.py b/src/sempy_labs/_spark.py index fdd1608..cae77fe 100644 --- a/src/sempy_labs/_spark.py +++ b/src/sempy_labs/_spark.py @@ -17,7 +17,7 @@ def list_custom_pools(workspace: Optional[str | UUID] = None) -> pd.DataFrame: Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -123,7 +123,7 @@ def create_custom_pool( The status of `auto scale `_. dynamic_executor_allocation_enabled : bool, default=True The status of the `dynamic executor allocation `_. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -204,7 +204,7 @@ def update_custom_pool( dynamic_executor_allocation_enabled : bool, default=None The status of the `dynamic executor allocation `_. Defaults to None which keeps the existing property setting. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -277,7 +277,7 @@ def delete_custom_pool(pool_name: str, workspace: Optional[str | UUID] = None): ---------- pool_name : str The custom pool name. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -314,7 +314,7 @@ def get_spark_settings( Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -427,7 +427,7 @@ def update_spark_settings( runtime_version : str, default=None The `runtime version `_. Defaults to None which keeps the existing property setting. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_sql.py b/src/sempy_labs/_sql.py index 07b07ca..776b342 100644 --- a/src/sempy_labs/_sql.py +++ b/src/sempy_labs/_sql.py @@ -5,7 +5,11 @@ import struct from itertools import chain, repeat from sempy.fabric.exceptions import FabricHTTPException -from sempy_labs._helper_functions import resolve_warehouse_id, resolve_lakehouse_id +from sempy_labs._helper_functions import ( + resolve_warehouse_id, + resolve_lakehouse_id, + resolve_workspace_name_and_id +) from uuid import UUID @@ -39,14 +43,13 @@ def __init__( from sempy.fabric._token_provider import SynapseTokenProvider import pyodbc - workspace = fabric.resolve_workspace_name(workspace) - workspace_id = fabric.resolve_workspace_id(workspace) + (workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace) # Resolve the appropriate ID (warehouse or lakehouse) if endpoint_type == "warehouse": - resource_id = resolve_warehouse_id(warehouse=name, workspace=workspace) + resource_id = resolve_warehouse_id(warehouse=name, workspace=workspace_id) else: - resource_id = resolve_lakehouse_id(lakehouse=name, workspace=workspace) + resource_id = resolve_lakehouse_id(lakehouse=name, workspace=workspace_id) # Get the TDS endpoint client = fabric.FabricRestClient() diff --git a/src/sempy_labs/_translations.py b/src/sempy_labs/_translations.py index db4affd..b15dd59 100644 --- a/src/sempy_labs/_translations.py +++ b/src/sempy_labs/_translations.py @@ -5,8 +5,6 @@ import sempy_labs._icons as icons from sempy_labs._helper_functions import ( get_language_codes, - resolve_dataset_name_and_id, - resolve_workspace_name_and_id, ) from uuid import UUID @@ -23,13 +21,13 @@ def translate_semantic_model( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. languages : str, List[str] The language code(s) in which to translate the semantic model. exclude_characters : str A string specifying characters which will be replaced by a space in the translation text when sent to the translation service. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_vertipaq.py b/src/sempy_labs/_vertipaq.py index 2194d67..cb7078d 100644 --- a/src/sempy_labs/_vertipaq.py +++ b/src/sempy_labs/_vertipaq.py @@ -39,9 +39,9 @@ def vertipaq_analyzer( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str| UUID, default=None + workspace : str| uuid.UUID, default=None The Fabric workspace name or ID in which the semantic model exists. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -51,10 +51,6 @@ def vertipaq_analyzer( Default value: None. read_stats_from_data : bool, default=False Setting this parameter to true has the function get Column Cardinality and Missing Rows using DAX (Direct Lake semantic models achieve this using a Spark query to the lakehouse). - - Returns - ------- - """ from sempy_labs.tom import connect_semantic_model diff --git a/src/sempy_labs/_warehouses.py b/src/sempy_labs/_warehouses.py index e16216a..e35a683 100644 --- a/src/sempy_labs/_warehouses.py +++ b/src/sempy_labs/_warehouses.py @@ -30,7 +30,7 @@ def create_warehouse( A description of the warehouse. case_insensitive_collation: bool, default=False If True, creates the warehouse with case-insensitive collation. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -68,7 +68,7 @@ def list_warehouses(workspace: Optional[str | UUID] = None) -> pd.DataFrame: Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -126,7 +126,7 @@ def delete_warehouse(name: str, workspace: Optional[str | UUID] = None): ---------- name: str Name of the warehouse. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -159,7 +159,7 @@ def get_warehouse_tables( ---------- warehouse : str Name of the Fabric warehouse. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -194,7 +194,7 @@ def get_warehouse_columns( ---------- warehouse : str Name of the Fabric warehouse. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_workspace_identity.py b/src/sempy_labs/_workspace_identity.py index c46ac49..78510c3 100644 --- a/src/sempy_labs/_workspace_identity.py +++ b/src/sempy_labs/_workspace_identity.py @@ -17,7 +17,7 @@ def provision_workspace_identity(workspace: Optional[str | UUID] = None): Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -46,7 +46,7 @@ def deprovision_workspace_identity(workspace: Optional[str | UUID] = None): Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/_workspaces.py b/src/sempy_labs/_workspaces.py index 5680d0e..3d290ce 100644 --- a/src/sempy_labs/_workspaces.py +++ b/src/sempy_labs/_workspaces.py @@ -23,7 +23,7 @@ def delete_user_from_workspace( ---------- email_address : str The email address of the user. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -60,7 +60,7 @@ def update_workspace_user( The `role `_ of the user within the workspace. principal_type : str, default='User' The `principal type `_. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -106,7 +106,7 @@ def list_workspace_users(workspace: Optional[str | UUID] = None) -> pd.DataFrame Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -161,7 +161,7 @@ def add_user_to_workspace( The `role `_ of the user within the workspace. principal_type : str, default='User' The `principal type `_. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -215,7 +215,7 @@ def assign_workspace_to_capacity( ---------- capacity_name : str The name of the capacity. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -247,7 +247,7 @@ def unassign_workspace_from_capacity(workspace: Optional[str | UUID] = None): Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -275,7 +275,7 @@ def list_workspace_role_assignments( Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_directlake_schema_compare.py b/src/sempy_labs/directlake/_directlake_schema_compare.py index 37dd616..a31cf2f 100644 --- a/src/sempy_labs/directlake/_directlake_schema_compare.py +++ b/src/sempy_labs/directlake/_directlake_schema_compare.py @@ -25,9 +25,9 @@ def direct_lake_schema_compare( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_directlake_schema_sync.py b/src/sempy_labs/directlake/_directlake_schema_sync.py index 1c7d281..fbb2820 100644 --- a/src/sempy_labs/directlake/_directlake_schema_sync.py +++ b/src/sempy_labs/directlake/_directlake_schema_sync.py @@ -26,9 +26,9 @@ def direct_lake_schema_sync( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_dl_helper.py b/src/sempy_labs/directlake/_dl_helper.py index 4d1252d..9abbf5a 100644 --- a/src/sempy_labs/directlake/_dl_helper.py +++ b/src/sempy_labs/directlake/_dl_helper.py @@ -15,17 +15,17 @@ def check_fallback_reason( - dataset: str | UUID, workspace: Optional[str] = None + dataset: str | UUID, workspace: Optional[str | UUID] = None ) -> pd.DataFrame: """ Shows the reason a table in a Direct Lake semantic model would fallback to DirectQuery. Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str, default=None - The Fabric workspace name. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -96,14 +96,14 @@ def generate_direct_lake_semantic_model( Name of the semantic model to be created. lakehouse_tables : str | List[str] The table(s) within the Fabric lakehouse to add to the semantic model. All columns from these tables will be added to the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the semantic model will reside. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. lakehouse : str, default=None The lakehouse which stores the delta tables which will feed the Direct Lake semantic model. Defaults to None which resolves to the attached lakehouse. - lakehouse_workspace : str | UUID, default=None + lakehouse_workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the lakehouse resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -209,9 +209,9 @@ def get_direct_lake_source( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID The name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_generate_shared_expression.py b/src/sempy_labs/directlake/_generate_shared_expression.py index 4ebe915..0e07bb7 100644 --- a/src/sempy_labs/directlake/_generate_shared_expression.py +++ b/src/sempy_labs/directlake/_generate_shared_expression.py @@ -26,7 +26,7 @@ def generate_shared_expression( Defaults to None which resolves to the lakehouse attached to the notebook. item_type : str, default="Lakehouse" The Fabric item name. Valid options: 'Lakehouse', 'Warehouse'. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the item. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_get_directlake_lakehouse.py b/src/sempy_labs/directlake/_get_directlake_lakehouse.py index f2883e3..b3d6f65 100644 --- a/src/sempy_labs/directlake/_get_directlake_lakehouse.py +++ b/src/sempy_labs/directlake/_get_directlake_lakehouse.py @@ -21,23 +21,23 @@ def get_direct_lake_lakehouse( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. lakehouse : str, default=None The Fabric lakehouse used by the Direct Lake semantic model. Defaults to None which resolves to the lakehouse attached to the notebook. - lakehouse_workspace : str | UUID, default=None + lakehouse_workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. Returns ------- - str, UUID + Tuple[str, uuid.UUID] The lakehouse name and lakehouse ID. """ diff --git a/src/sempy_labs/directlake/_get_shared_expression.py b/src/sempy_labs/directlake/_get_shared_expression.py index 3a56389..e2bceca 100644 --- a/src/sempy_labs/directlake/_get_shared_expression.py +++ b/src/sempy_labs/directlake/_get_shared_expression.py @@ -13,7 +13,7 @@ def get_shared_expression( lakehouse : str, default=None The Fabric lakehouse used by the Direct Lake semantic model. Defaults to None which resolves to the lakehouse attached to the notebook. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_guardrails.py b/src/sempy_labs/directlake/_guardrails.py index f4863be..df03143 100644 --- a/src/sempy_labs/directlake/_guardrails.py +++ b/src/sempy_labs/directlake/_guardrails.py @@ -38,7 +38,7 @@ def get_sku_size(workspace: Optional[str | UUID] = None) -> str: Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -51,7 +51,7 @@ def get_sku_size(workspace: Optional[str | UUID] = None) -> str: (workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace) - dfW = fabric.list_workspaces(filter=f"name eq '{workspace_name}'") + dfW = fabric.list_workspaces(filter=f"id eq '{workspace_id}'") if len(dfW) == 0: raise ValueError( diff --git a/src/sempy_labs/directlake/_list_directlake_model_calc_tables.py b/src/sempy_labs/directlake/_list_directlake_model_calc_tables.py index 2516d35..4408825 100644 --- a/src/sempy_labs/directlake/_list_directlake_model_calc_tables.py +++ b/src/sempy_labs/directlake/_list_directlake_model_calc_tables.py @@ -21,9 +21,9 @@ def list_direct_lake_model_calc_tables( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/directlake/_show_unsupported_directlake_objects.py b/src/sempy_labs/directlake/_show_unsupported_directlake_objects.py index 99d6c5b..3caa6c4 100644 --- a/src/sempy_labs/directlake/_show_unsupported_directlake_objects.py +++ b/src/sempy_labs/directlake/_show_unsupported_directlake_objects.py @@ -20,9 +20,9 @@ def show_unsupported_direct_lake_objects( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/lakehouse/_get_lakehouse_columns.py b/src/sempy_labs/lakehouse/_get_lakehouse_columns.py index 729eb57..7d3c2b2 100644 --- a/src/sempy_labs/lakehouse/_get_lakehouse_columns.py +++ b/src/sempy_labs/lakehouse/_get_lakehouse_columns.py @@ -24,7 +24,7 @@ def get_lakehouse_columns( lakehouse : str, default=None The Fabric lakehouse. Defaults to None which resolves to the lakehouse attached to the notebook. - lakehouse_workspace : str | UUID, default=None + lakehouse_workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/lakehouse/_get_lakehouse_tables.py b/src/sempy_labs/lakehouse/_get_lakehouse_tables.py index 3c689c5..bea6208 100644 --- a/src/sempy_labs/lakehouse/_get_lakehouse_tables.py +++ b/src/sempy_labs/lakehouse/_get_lakehouse_tables.py @@ -39,7 +39,7 @@ def get_lakehouse_tables( lakehouse : str, default=None The Fabric lakehouse. Defaults to None which resolves to the lakehouse attached to the notebook. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/lakehouse/_lakehouse.py b/src/sempy_labs/lakehouse/_lakehouse.py index f2b9d34..85202c1 100644 --- a/src/sempy_labs/lakehouse/_lakehouse.py +++ b/src/sempy_labs/lakehouse/_lakehouse.py @@ -46,7 +46,7 @@ def optimize_lakehouse_tables( lakehouse : str, default=None The Fabric lakehouse. Defaults to None which resolves to the lakehouse attached to the notebook. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -100,7 +100,7 @@ def vacuum_lakehouse_tables( lakehouse : str, default=None The Fabric lakehouse. Defaults to None which resolves to the lakehouse attached to the notebook. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID used by the lakehouse. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/lakehouse/_shortcuts.py b/src/sempy_labs/lakehouse/_shortcuts.py index 489fe36..378ffcb 100644 --- a/src/sempy_labs/lakehouse/_shortcuts.py +++ b/src/sempy_labs/lakehouse/_shortcuts.py @@ -29,11 +29,11 @@ def create_shortcut_onelake( The table name for which a shortcut will be created. source_lakehouse : str The Fabric lakehouse in which the table resides. - source_workspace : str | UUID + source_workspace : str | uuid.UUID The name or ID of the Fabric workspace in which the source lakehouse exists. destination_lakehouse : str The Fabric lakehouse in which the shortcut will be created. - destination_workspace : str | UUID, default=None + destination_workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace in which the shortcut will be created. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/migration/_create_pqt_file.py b/src/sempy_labs/migration/_create_pqt_file.py index a8b4e9f..ba9c352 100644 --- a/src/sempy_labs/migration/_create_pqt_file.py +++ b/src/sempy_labs/migration/_create_pqt_file.py @@ -28,9 +28,9 @@ def create_pqt_file( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_download_report.py b/src/sempy_labs/report/_download_report.py index 5cb6f0e..6ac9db1 100644 --- a/src/sempy_labs/report/_download_report.py +++ b/src/sempy_labs/report/_download_report.py @@ -30,7 +30,7 @@ def download_report( Defaults to None which resolves to the name of the report. download_type : str, default="LiveConnect" The type of download. Valid values are "LiveConnect" and "IncludeModel". - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_generate_report.py b/src/sempy_labs/report/_generate_report.py index 55f39a5..37bd94d 100644 --- a/src/sempy_labs/report/_generate_report.py +++ b/src/sempy_labs/report/_generate_report.py @@ -31,13 +31,13 @@ def create_report_from_reportjson( ---------- report : str Name of the report. - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model to connect to the report. report_json : dict The report.json file to be used to create the report. theme_json : dict, default=None The theme.json file to be used for the theme of the report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -127,7 +127,7 @@ def update_report_from_reportjson( Name of the report. report_json : dict The report.json file to be used to update the report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the report resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -184,7 +184,7 @@ def get_report_definition( ---------- report : str Name of the report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the report resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -230,7 +230,7 @@ def create_model_bpa_report( dataset : str, default='ModelBPA' Name of the semantic model which feeds this report. Defaults to 'ModelBPA' - dataset_workspace : str | UUID, default=None + dataset_workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the semantic model resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_paginated.py b/src/sempy_labs/report/_paginated.py index 6ccb332..dbedebe 100644 --- a/src/sempy_labs/report/_paginated.py +++ b/src/sempy_labs/report/_paginated.py @@ -19,7 +19,7 @@ def get_report_datasources( ---------- report : str | List[str] Name(s) of the Power BI report(s). - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace in which the report resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_report_bpa.py b/src/sempy_labs/report/_report_bpa.py index 53e7d81..a9ede3e 100644 --- a/src/sempy_labs/report/_report_bpa.py +++ b/src/sempy_labs/report/_report_bpa.py @@ -39,7 +39,7 @@ def run_report_bpa( Name of the report. rules : pandas.DataFrame, default=None A pandas dataframe containing rules to be evaluated. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_report_functions.py b/src/sempy_labs/report/_report_functions.py index fc2c286..8d19646 100644 --- a/src/sempy_labs/report/_report_functions.py +++ b/src/sempy_labs/report/_report_functions.py @@ -40,7 +40,7 @@ def get_report_json( ---------- report : str Name of the Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID in which the report exists. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -98,7 +98,7 @@ def report_dependency_tree(workspace: Optional[str | UUID] = None): Parameters ---------- - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -177,7 +177,7 @@ def export_report( The name (GUID) of a visual. If you specify this parameter you must also specify the page_name parameter. report_filter : str, default=None A report filter to be applied when exporting the report. Syntax is user-friendly. See above for examples. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -408,7 +408,7 @@ def clone_report( Name of the Power BI report. cloned_report : str Name of the new Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -479,7 +479,7 @@ def launch_report(report: str, workspace: Optional[str | UUID] = None): ---------- report : str Name of the Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -507,7 +507,7 @@ def list_report_pages(report: str, workspace: Optional[str | UUID] = None): ---------- report : str Name of the Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -569,7 +569,7 @@ def list_report_visuals(report: str, workspace: Optional[str | UUID] = None): ---------- report : str Name of the Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -622,7 +622,7 @@ def list_report_bookmarks(report: str, workspace: Optional[str | UUID] = None): ---------- report : str Name of the Power BI report. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -715,7 +715,7 @@ def translate_report_titles( Name of the Power BI report. languages : str, List[str] The language code(s) in which to translate the report titles. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_report_list_functions.py b/src/sempy_labs/report/_report_list_functions.py index 6fbec84..f54562b 100644 --- a/src/sempy_labs/report/_report_list_functions.py +++ b/src/sempy_labs/report/_report_list_functions.py @@ -20,9 +20,9 @@ def list_unused_objects_in_reports( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. @@ -68,9 +68,9 @@ def _list_all_report_semantic_model_objects( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. - workspace : str | UUID, default=None + workspace : str | uuid.UUID, default=None The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_report_rebind.py b/src/sempy_labs/report/_report_rebind.py index 97bd51c..bdd5d87 100644 --- a/src/sempy_labs/report/_report_rebind.py +++ b/src/sempy_labs/report/_report_rebind.py @@ -29,11 +29,11 @@ def report_rebind( Name(s) of the Power BI report(s). dataset : str Name of the semantic model. - report_workspace : str | UUID, default=None + report_workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace in which the report resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. - dataset_workspace : str | UUID, default=None + dataset_workspace : str | uuid.UUID, default=None The name or ID of the Fabric workspace in which the semantic model resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/report/_reportwrapper.py b/src/sempy_labs/report/_reportwrapper.py index 9fa9719..7d783dd 100644 --- a/src/sempy_labs/report/_reportwrapper.py +++ b/src/sempy_labs/report/_reportwrapper.py @@ -33,7 +33,7 @@ class ReportWrapper: ---------- report : str The name of the report. - workspace : str | UUID + workspace : str | uuid.UUID The name or ID of the workspace in which the report resides. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook. diff --git a/src/sempy_labs/tom/_model.py b/src/sempy_labs/tom/_model.py index cb81853..2246afb 100644 --- a/src/sempy_labs/tom/_model.py +++ b/src/sempy_labs/tom/_model.py @@ -4666,12 +4666,12 @@ def connect_semantic_model( Parameters ---------- - dataset : str | UUID + dataset : str | uuid.UUID Name or ID of the semantic model. readonly: bool, default=True Whether the connection is read-only or read/write. Setting this to False enables read/write which saves the changes made back to the server. - workspace : str, default=None - The Fabric workspace name. + workspace : str | uuid.UUID, default=None + The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.