semantic-link-labs 0.8.4__py3-none-any.whl → 0.8.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of semantic-link-labs might be problematic. Click here for more details.

Files changed (49) hide show
  1. {semantic_link_labs-0.8.4.dist-info → semantic_link_labs-0.8.6.dist-info}/METADATA +9 -3
  2. {semantic_link_labs-0.8.4.dist-info → semantic_link_labs-0.8.6.dist-info}/RECORD +49 -47
  3. {semantic_link_labs-0.8.4.dist-info → semantic_link_labs-0.8.6.dist-info}/WHEEL +1 -1
  4. sempy_labs/__init__.py +29 -1
  5. sempy_labs/_data_pipelines.py +3 -3
  6. sempy_labs/_dataflows.py +116 -3
  7. sempy_labs/_dax.py +189 -3
  8. sempy_labs/_deployment_pipelines.py +3 -3
  9. sempy_labs/_environments.py +3 -3
  10. sempy_labs/_eventhouses.py +3 -3
  11. sempy_labs/_eventstreams.py +3 -3
  12. sempy_labs/_external_data_shares.py +1 -1
  13. sempy_labs/_generate_semantic_model.py +3 -3
  14. sempy_labs/_git.py +7 -7
  15. sempy_labs/_helper_functions.py +25 -1
  16. sempy_labs/_kql_databases.py +3 -3
  17. sempy_labs/_kql_querysets.py +3 -3
  18. sempy_labs/_mirrored_databases.py +428 -0
  19. sempy_labs/_mirrored_warehouses.py +1 -1
  20. sempy_labs/_ml_experiments.py +3 -3
  21. sempy_labs/_ml_models.py +4 -4
  22. sempy_labs/_model_bpa.py +209 -180
  23. sempy_labs/_model_bpa_bulk.py +48 -24
  24. sempy_labs/_model_dependencies.py +42 -86
  25. sempy_labs/_notebooks.py +2 -2
  26. sempy_labs/_query_scale_out.py +4 -4
  27. sempy_labs/_refresh_semantic_model.py +2 -2
  28. sempy_labs/_spark.py +6 -6
  29. sempy_labs/_vertipaq.py +31 -19
  30. sempy_labs/_warehouses.py +3 -3
  31. sempy_labs/_workspace_identity.py +2 -2
  32. sempy_labs/_workspaces.py +7 -7
  33. sempy_labs/admin/__init__.py +2 -0
  34. sempy_labs/admin/_basic_functions.py +54 -8
  35. sempy_labs/admin/_domains.py +1 -1
  36. sempy_labs/directlake/_update_directlake_partition_entity.py +1 -1
  37. sempy_labs/directlake/_warm_cache.py +10 -9
  38. sempy_labs/lakehouse/_get_lakehouse_tables.py +1 -1
  39. sempy_labs/lakehouse/_shortcuts.py +2 -2
  40. sempy_labs/migration/_create_pqt_file.py +9 -4
  41. sempy_labs/report/__init__.py +2 -0
  42. sempy_labs/report/_download_report.py +75 -0
  43. sempy_labs/report/_generate_report.py +3 -3
  44. sempy_labs/report/_report_functions.py +3 -3
  45. sempy_labs/report/_report_rebind.py +1 -1
  46. sempy_labs/report/_reportwrapper.py +4 -2
  47. sempy_labs/tom/_model.py +71 -35
  48. {semantic_link_labs-0.8.4.dist-info → semantic_link_labs-0.8.6.dist-info}/LICENSE +0 -0
  49. {semantic_link_labs-0.8.4.dist-info → semantic_link_labs-0.8.6.dist-info}/top_level.txt +0 -0
@@ -11,7 +11,7 @@ def list_deployment_pipelines() -> pd.DataFrame:
11
11
  """
12
12
  Shows a list of deployment pipelines the user can access.
13
13
 
14
- This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipelines <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipelines`_.
14
+ This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipelines <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipelines>`_.
15
15
 
16
16
  Returns
17
17
  -------
@@ -47,7 +47,7 @@ def list_deployment_pipeline_stages(deployment_pipeline: str) -> pd.DataFrame:
47
47
  """
48
48
  Shows the specified deployment pipeline stages.
49
49
 
50
- This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipeline Stages <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipeline-stages`_.
50
+ This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipeline Stages <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipeline-stages>`_.
51
51
 
52
52
  Parameters
53
53
  ----------
@@ -110,7 +110,7 @@ def list_deployment_pipeline_stage_items(
110
110
  """
111
111
  Shows the supported items from the workspace assigned to the specified stage of the specified deployment pipeline.
112
112
 
113
- This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipeline Stage Items <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipeline-stage-items`_.
113
+ This is a wrapper function for the following API: `Deployment Pipelines - List Deployment Pipeline Stage Items <https://learn.microsoft.com/rest/api/fabric/core/deployment-pipelines/list-deployment-pipeline-stage-items>`_.
114
114
 
115
115
  Parameters
116
116
  ----------
@@ -16,7 +16,7 @@ def create_environment(
16
16
  """
17
17
  Creates a Fabric environment.
18
18
 
19
- This is a wrapper function for the following API: `Items - Create Environment <https://learn.microsoft.com/rest/api/fabric/environment/items/create-environment`_.
19
+ This is a wrapper function for the following API: `Items - Create Environment <https://learn.microsoft.com/rest/api/fabric/environment/items/create-environment>`_.
20
20
 
21
21
  Parameters
22
22
  ----------
@@ -53,7 +53,7 @@ def list_environments(workspace: Optional[str] = None) -> pd.DataFrame:
53
53
  """
54
54
  Shows the environments within a workspace.
55
55
 
56
- This is a wrapper function for the following API: `Items - List Environments <https://learn.microsoft.com/rest/api/fabric/environment/items/list-environments`_.
56
+ This is a wrapper function for the following API: `Items - List Environments <https://learn.microsoft.com/rest/api/fabric/environment/items/list-environments>`_.
57
57
 
58
58
  Parameters
59
59
  ----------
@@ -95,7 +95,7 @@ def delete_environment(environment: str, workspace: Optional[str] = None):
95
95
  """
96
96
  Deletes a Fabric environment.
97
97
 
98
- This is a wrapper function for the following API: `Items - Delete Environment <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-environment`_.
98
+ This is a wrapper function for the following API: `Items - Delete Environment <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-environment>`_.
99
99
 
100
100
  Parameters
101
101
  ----------
@@ -16,7 +16,7 @@ def create_eventhouse(
16
16
  """
17
17
  Creates a Fabric eventhouse.
18
18
 
19
- This is a wrapper function for the following API: `Items - Create Eventhouse <https://learn.microsoft.com/rest/api/fabric/environment/items/create-eventhouse`_.
19
+ This is a wrapper function for the following API: `Items - Create Eventhouse <https://learn.microsoft.com/rest/api/fabric/environment/items/create-eventhouse>`_.
20
20
 
21
21
  Parameters
22
22
  ----------
@@ -53,7 +53,7 @@ def list_eventhouses(workspace: Optional[str] = None) -> pd.DataFrame:
53
53
  """
54
54
  Shows the eventhouses within a workspace.
55
55
 
56
- This is a wrapper function for the following API: `Items - List Eventhouses <https://learn.microsoft.com/rest/api/fabric/environment/items/list-eventhouses`_.
56
+ This is a wrapper function for the following API: `Items - List Eventhouses <https://learn.microsoft.com/rest/api/fabric/environment/items/list-eventhouses>`_.
57
57
 
58
58
  Parameters
59
59
  ----------
@@ -95,7 +95,7 @@ def delete_eventhouse(name: str, workspace: Optional[str] = None):
95
95
  """
96
96
  Deletes a Fabric eventhouse.
97
97
 
98
- This is a wrapper function for the following API: `Items - Delete Eventhouse <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-eventhouse`_.
98
+ This is a wrapper function for the following API: `Items - Delete Eventhouse <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-eventhouse>`_.
99
99
 
100
100
  Parameters
101
101
  ----------
@@ -14,7 +14,7 @@ def list_eventstreams(workspace: Optional[str] = None) -> pd.DataFrame:
14
14
  """
15
15
  Shows the eventstreams within a workspace.
16
16
 
17
- This is a wrapper function for the following API: `Items - List Eventstreams <https://learn.microsoft.com/rest/api/fabric/environment/items/list-eventstreams`_.
17
+ This is a wrapper function for the following API: `Items - List Eventstreams <https://learn.microsoft.com/rest/api/fabric/environment/items/list-eventstreams>`_.
18
18
 
19
19
  Parameters
20
20
  ----------
@@ -58,7 +58,7 @@ def create_eventstream(
58
58
  """
59
59
  Creates a Fabric eventstream.
60
60
 
61
- This is a wrapper function for the following API: `Items - Create Eventstream <https://learn.microsoft.com/rest/api/fabric/environment/items/create-eventstream`_.
61
+ This is a wrapper function for the following API: `Items - Create Eventstream <https://learn.microsoft.com/rest/api/fabric/environment/items/create-eventstream>`_.
62
62
 
63
63
  Parameters
64
64
  ----------
@@ -95,7 +95,7 @@ def delete_eventstream(name: str, workspace: Optional[str] = None):
95
95
  """
96
96
  Deletes a Fabric eventstream.
97
97
 
98
- This is a wrapper function for the following API: `Items - Delete Eventstream <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-eventstream`_.
98
+ This is a wrapper function for the following API: `Items - Delete Eventstream <https://learn.microsoft.com/rest/api/fabric/environment/items/delete-eventstream>`_.
99
99
 
100
100
  Parameters
101
101
  ----------
@@ -20,7 +20,7 @@ def create_external_data_share(
20
20
  """
21
21
  Creates an external data share for a given path or list of paths in the specified item.
22
22
 
23
- This is a wrapper function for the following API: `External Data Shares - Create External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/create-external-data-share`_.
23
+ This is a wrapper function for the following API: `External Data Shares - Create External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/create-external-data-share>`_.
24
24
 
25
25
  Parameters
26
26
  ----------
@@ -102,7 +102,7 @@ def create_semantic_model_from_bim(
102
102
  """
103
103
  Creates a new semantic model based on a Model.bim file.
104
104
 
105
- This is a wrapper function for the following API: `Items - Create Semantic Model <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/create-semantic-model`_.
105
+ This is a wrapper function for the following API: `Items - Create Semantic Model <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/create-semantic-model>`_.
106
106
 
107
107
  Parameters
108
108
  ----------
@@ -168,7 +168,7 @@ def update_semantic_model_from_bim(
168
168
  """
169
169
  Updates a semantic model definition based on a Model.bim file.
170
170
 
171
- This is a wrapper function for the following API: `Items - Update Semantic Model Definition <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/update-semantic-model-definition`_.
171
+ This is a wrapper function for the following API: `Items - Update Semantic Model Definition <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/update-semantic-model-definition>`_.
172
172
 
173
173
  Parameters
174
174
  ----------
@@ -308,7 +308,7 @@ def get_semantic_model_bim(
308
308
  """
309
309
  Extracts the Model.bim file for a given semantic model.
310
310
 
311
- This is a wrapper function for the following API: `Items - Get Semantic Model Definition <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/get-semantic-model-definition`_.
311
+ This is a wrapper function for the following API: `Items - Get Semantic Model Definition <https://learn.microsoft.com/rest/api/fabric/semanticmodel/items/get-semantic-model-definition>`_.
312
312
 
313
313
  Parameters
314
314
  ----------
sempy_labs/_git.py CHANGED
@@ -21,7 +21,7 @@ def connect_workspace_to_git(
21
21
  """
22
22
  Connects a workspace to a git repository.
23
23
 
24
- This is a wrapper function for the following API: `Git - Connect <https://learn.microsoft.com/rest/api/fabric/core/git/connect`_.
24
+ This is a wrapper function for the following API: `Git - Connect <https://learn.microsoft.com/rest/api/fabric/core/git/connect>`_.
25
25
 
26
26
  Parameters
27
27
  ----------
@@ -72,7 +72,7 @@ def disconnect_workspace_from_git(workspace: Optional[str] = None):
72
72
  """
73
73
  Disconnects a workpsace from a git repository.
74
74
 
75
- This is a wrapper function for the following API: `Git - Disconnect <https://learn.microsoft.com/rest/api/fabric/core/git/disconnect`_.
75
+ This is a wrapper function for the following API: `Git - Disconnect <https://learn.microsoft.com/rest/api/fabric/core/git/disconnect>`_.
76
76
 
77
77
  Parameters
78
78
  ----------
@@ -98,7 +98,7 @@ def get_git_status(workspace: Optional[str] = None) -> pd.DataFrame:
98
98
  """
99
99
  Obtains the Git status of items in the workspace, that can be committed to Git.
100
100
 
101
- This is a wrapper function for the following API: `Git - Get Status <https://learn.microsoft.com/rest/api/fabric/core/git/get-status`_.
101
+ This is a wrapper function for the following API: `Git - Get Status <https://learn.microsoft.com/rest/api/fabric/core/git/get-status>.
102
102
 
103
103
  Parameters
104
104
  ----------
@@ -161,7 +161,7 @@ def get_git_connection(workspace: Optional[str] = None) -> pd.DataFrame:
161
161
  """
162
162
  Obtains the Git status of items in the workspace, that can be committed to Git.
163
163
 
164
- This is a wrapper function for the following API: `Git - Get Connection <https://learn.microsoft.com/rest/api/fabric/core/git/get-connection`_.
164
+ This is a wrapper function for the following API: `Git - Get Connection <https://learn.microsoft.com/rest/api/fabric/core/git/get-connection>`_.
165
165
 
166
166
  Parameters
167
167
  ----------
@@ -221,7 +221,7 @@ def initialize_git_connection(workspace: Optional[str] = None):
221
221
  """
222
222
  Initializes a connection for a workspace that is connected to Git.
223
223
 
224
- This is a wrapper function for the following API: `Git - Initialize Connection <https://learn.microsoft.com/rest/api/fabric/core/git/initialize-connection`_.
224
+ This is a wrapper function for the following API: `Git - Initialize Connection <https://learn.microsoft.com/rest/api/fabric/core/git/initialize-connection>`_.
225
225
 
226
226
  Parameters
227
227
  ----------
@@ -252,7 +252,7 @@ def commit_to_git(
252
252
  """
253
253
  Commits all or a selection of items within a workspace to Git.
254
254
 
255
- This is a wrapper function for the following API: `Git - Commit to Git <https://learn.microsoft.com/rest/api/fabric/core/git/commit-to-git`_.
255
+ This is a wrapper function for the following API: `Git - Commit to Git <https://learn.microsoft.com/rest/api/fabric/core/git/commit-to-git>`_.
256
256
 
257
257
  Parameters
258
258
  ----------
@@ -320,7 +320,7 @@ def update_from_git(
320
320
  """
321
321
  Updates the workspace with commits pushed to the connected branch.
322
322
 
323
- This is a wrapper function for the following API: `Git - Update From Git <https://learn.microsoft.com/rest/api/fabric/core/git/update-from-git`_.
323
+ This is a wrapper function for the following API: `Git - Update From Git <https://learn.microsoft.com/rest/api/fabric/core/git/update-from-git>`_.
324
324
 
325
325
  Parameters
326
326
  ----------
@@ -1144,7 +1144,7 @@ def _get_max_run_id(lakehouse: str, table_name: str) -> int:
1144
1144
  spark = SparkSession.builder.getOrCreate()
1145
1145
  query = f"SELECT MAX(RunId) FROM {lakehouse}.{table_name}"
1146
1146
  dfSpark = spark.sql(query)
1147
- max_run_id = dfSpark.collect()[0][0]
1147
+ max_run_id = dfSpark.collect()[0][0] or 0
1148
1148
 
1149
1149
  return max_run_id
1150
1150
 
@@ -1317,3 +1317,27 @@ def _convert_data_type(input_data_type: str) -> str:
1317
1317
  return "Decimal"
1318
1318
  else:
1319
1319
  return data_type_mapping.get(input_data_type)
1320
+
1321
+
1322
+ def _is_valid_uuid(
1323
+ guid: str,
1324
+ ):
1325
+ """
1326
+ Validates if a string is a valid GUID in version 4
1327
+
1328
+ Parameters
1329
+ ----------
1330
+ guid : str
1331
+ GUID to be validated.
1332
+
1333
+ Returns
1334
+ -------
1335
+ bool
1336
+ Boolean that indicates if the string is a GUID or not.
1337
+ """
1338
+
1339
+ try:
1340
+ UUID(str(guid), version=4)
1341
+ return True
1342
+ except ValueError:
1343
+ return False
@@ -14,7 +14,7 @@ def list_kql_databases(workspace: Optional[str] = None) -> pd.DataFrame:
14
14
  """
15
15
  Shows the KQL databases within a workspace.
16
16
 
17
- This is a wrapper function for the following API: `Items - List KQL Databases <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/list-kql-databases`_.
17
+ This is a wrapper function for the following API: `Items - List KQL Databases <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/list-kql-databases>`_.
18
18
 
19
19
  Parameters
20
20
  ----------
@@ -74,7 +74,7 @@ def create_kql_database(
74
74
  """
75
75
  Creates a KQL database.
76
76
 
77
- This is a wrapper function for the following API: `Items - Create KQL Database <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/create-kql-database`_.
77
+ This is a wrapper function for the following API: `Items - Create KQL Database <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/create-kql-database>`_.
78
78
 
79
79
  Parameters
80
80
  ----------
@@ -111,7 +111,7 @@ def delete_kql_database(name: str, workspace: Optional[str] = None):
111
111
  """
112
112
  Deletes a KQL database.
113
113
 
114
- This is a wrapper function for the following API: `Items - Delete KQL Database <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/delete-kql-database`_.
114
+ This is a wrapper function for the following API: `Items - Delete KQL Database <https://learn.microsoft.com/rest/api/fabric/kqldatabase/items/delete-kql-database>`_.
115
115
 
116
116
  Parameters
117
117
  ----------
@@ -14,7 +14,7 @@ def list_kql_querysets(workspace: Optional[str] = None) -> pd.DataFrame:
14
14
  """
15
15
  Shows the KQL querysets within a workspace.
16
16
 
17
- This is a wrapper function for the following API: `Items - List KQL Querysets <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/list-kql-querysets`_.
17
+ This is a wrapper function for the following API: `Items - List KQL Querysets <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/list-kql-querysets>`_.
18
18
 
19
19
  Parameters
20
20
  ----------
@@ -64,7 +64,7 @@ def create_kql_queryset(
64
64
  """
65
65
  Creates a KQL queryset.
66
66
 
67
- This is a wrapper function for the following API: `Items - Create KQL Queryset <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/create-kql-queryset`_.
67
+ This is a wrapper function for the following API: `Items - Create KQL Queryset <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/create-kql-queryset>`_.
68
68
 
69
69
  Parameters
70
70
  ----------
@@ -101,7 +101,7 @@ def delete_kql_queryset(name: str, workspace: Optional[str] = None):
101
101
  """
102
102
  Deletes a KQL queryset.
103
103
 
104
- This is a wrapper function for the following API: `Items - Delete KQL Queryset <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/delete-kql-queryset`_.
104
+ This is a wrapper function for the following API: `Items - Delete KQL Queryset <https://learn.microsoft.com/rest/api/fabric/kqlqueryset/items/delete-kql-queryset>`_.
105
105
 
106
106
  Parameters
107
107
  ----------