semantic-link-labs 0.8.3__py3-none-any.whl → 0.8.4__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 (101) hide show
  1. {semantic_link_labs-0.8.3.dist-info → semantic_link_labs-0.8.4.dist-info}/METADATA +33 -8
  2. {semantic_link_labs-0.8.3.dist-info → semantic_link_labs-0.8.4.dist-info}/RECORD +101 -98
  3. {semantic_link_labs-0.8.3.dist-info → semantic_link_labs-0.8.4.dist-info}/WHEEL +1 -1
  4. sempy_labs/__init__.py +24 -0
  5. sempy_labs/_bpa_translation/_model/_translations_am-ET.po +24 -5
  6. sempy_labs/_bpa_translation/_model/_translations_ar-AE.po +28 -4
  7. sempy_labs/_bpa_translation/_model/_translations_bg-BG.po +34 -4
  8. sempy_labs/_bpa_translation/_model/_translations_ca-ES.po +33 -4
  9. sempy_labs/_bpa_translation/_model/_translations_cs-CZ.po +31 -4
  10. sempy_labs/_bpa_translation/_model/_translations_da-DK.po +31 -4
  11. sempy_labs/_bpa_translation/_model/_translations_de-DE.po +34 -4
  12. sempy_labs/_bpa_translation/_model/_translations_el-GR.po +36 -4
  13. sempy_labs/_bpa_translation/_model/_translations_es-ES.po +90 -58
  14. sempy_labs/_bpa_translation/_model/_translations_fa-IR.po +31 -5
  15. sempy_labs/_bpa_translation/_model/_translations_fi-FI.po +31 -4
  16. sempy_labs/_bpa_translation/_model/_translations_fr-FR.po +34 -4
  17. sempy_labs/_bpa_translation/_model/_translations_ga-IE.po +34 -4
  18. sempy_labs/_bpa_translation/_model/_translations_he-IL.po +28 -4
  19. sempy_labs/_bpa_translation/_model/_translations_hi-IN.po +32 -4
  20. sempy_labs/_bpa_translation/_model/_translations_hu-HU.po +32 -4
  21. sempy_labs/_bpa_translation/_model/_translations_id-ID.po +32 -4
  22. sempy_labs/_bpa_translation/_model/_translations_is-IS.po +31 -4
  23. sempy_labs/_bpa_translation/_model/_translations_it-IT.po +34 -4
  24. sempy_labs/_bpa_translation/_model/_translations_ja-JP.po +24 -4
  25. sempy_labs/_bpa_translation/_model/_translations_ko-KR.po +72 -56
  26. sempy_labs/_bpa_translation/_model/_translations_mt-MT.po +34 -4
  27. sempy_labs/_bpa_translation/_model/_translations_nl-NL.po +34 -4
  28. sempy_labs/_bpa_translation/_model/_translations_pl-PL.po +95 -71
  29. sempy_labs/_bpa_translation/_model/_translations_pt-BR.po +32 -4
  30. sempy_labs/_bpa_translation/_model/_translations_pt-PT.po +32 -4
  31. sempy_labs/_bpa_translation/_model/_translations_ro-RO.po +33 -4
  32. sempy_labs/_bpa_translation/_model/_translations_ru-RU.po +34 -4
  33. sempy_labs/_bpa_translation/_model/_translations_sk-SK.po +31 -4
  34. sempy_labs/_bpa_translation/_model/_translations_sl-SL.po +32 -4
  35. sempy_labs/_bpa_translation/_model/_translations_sv-SE.po +32 -4
  36. sempy_labs/_bpa_translation/_model/_translations_ta-IN.po +32 -4
  37. sempy_labs/_bpa_translation/_model/_translations_te-IN.po +31 -4
  38. sempy_labs/_bpa_translation/_model/_translations_th-TH.po +31 -4
  39. sempy_labs/_bpa_translation/_model/_translations_tr-TR.po +32 -4
  40. sempy_labs/_bpa_translation/_model/_translations_uk-UA.po +100 -72
  41. sempy_labs/_bpa_translation/_model/_translations_zh-CN.po +23 -5
  42. sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po +32 -4
  43. sempy_labs/_capacities.py +49 -14
  44. sempy_labs/_capacity_migration.py +1 -7
  45. sempy_labs/_data_pipelines.py +6 -0
  46. sempy_labs/_dataflows.py +4 -0
  47. sempy_labs/_deployment_pipelines.py +13 -7
  48. sempy_labs/_environments.py +6 -0
  49. sempy_labs/_eventhouses.py +6 -0
  50. sempy_labs/_eventstreams.py +6 -0
  51. sempy_labs/_external_data_shares.py +6 -4
  52. sempy_labs/_generate_semantic_model.py +26 -3
  53. sempy_labs/_git.py +14 -14
  54. sempy_labs/_helper_functions.py +172 -0
  55. sempy_labs/_icons.py +55 -22
  56. sempy_labs/_kql_databases.py +6 -0
  57. sempy_labs/_kql_querysets.py +6 -0
  58. sempy_labs/_list_functions.py +1 -1
  59. sempy_labs/_managed_private_endpoints.py +166 -0
  60. sempy_labs/_mirrored_warehouses.py +2 -0
  61. sempy_labs/_ml_experiments.py +6 -0
  62. sempy_labs/_ml_models.py +6 -0
  63. sempy_labs/_model_bpa.py +6 -1
  64. sempy_labs/_model_bpa_bulk.py +11 -25
  65. sempy_labs/_model_bpa_rules.py +8 -3
  66. sempy_labs/_notebooks.py +107 -12
  67. sempy_labs/_query_scale_out.py +8 -6
  68. sempy_labs/_refresh_semantic_model.py +299 -49
  69. sempy_labs/_spark.py +12 -5
  70. sempy_labs/_translations.py +2 -0
  71. sempy_labs/_vertipaq.py +58 -67
  72. sempy_labs/_warehouses.py +79 -0
  73. sempy_labs/_workloads.py +128 -0
  74. sempy_labs/_workspace_identity.py +4 -4
  75. sempy_labs/_workspaces.py +14 -1
  76. sempy_labs/admin/_basic_functions.py +85 -43
  77. sempy_labs/admin/_domains.py +18 -18
  78. sempy_labs/directlake/__init__.py +2 -0
  79. sempy_labs/directlake/_directlake_schema_sync.py +2 -1
  80. sempy_labs/directlake/_dl_helper.py +4 -1
  81. sempy_labs/directlake/_get_shared_expression.py +7 -1
  82. sempy_labs/directlake/_guardrails.py +2 -1
  83. sempy_labs/directlake/_show_unsupported_directlake_objects.py +1 -7
  84. sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py +78 -0
  85. sempy_labs/directlake/_update_directlake_partition_entity.py +13 -32
  86. sempy_labs/lakehouse/_get_lakehouse_tables.py +6 -2
  87. sempy_labs/lakehouse/_shortcuts.py +4 -0
  88. sempy_labs/migration/_migrate_calctables_to_lakehouse.py +3 -2
  89. sempy_labs/migration/_migrate_calctables_to_semantic_model.py +2 -0
  90. sempy_labs/migration/_migrate_model_objects_to_semantic_model.py +2 -8
  91. sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py +17 -0
  92. sempy_labs/migration/_migration_validation.py +2 -0
  93. sempy_labs/migration/_refresh_calc_tables.py +1 -0
  94. sempy_labs/report/__init__.py +4 -1
  95. sempy_labs/report/_generate_report.py +6 -0
  96. sempy_labs/report/_paginated.py +74 -0
  97. sempy_labs/report/_report_functions.py +6 -0
  98. sempy_labs/report/_report_rebind.py +2 -0
  99. sempy_labs/tom/_model.py +64 -33
  100. {semantic_link_labs-0.8.3.dist-info → semantic_link_labs-0.8.4.dist-info}/LICENSE +0 -0
  101. {semantic_link_labs-0.8.3.dist-info → semantic_link_labs-0.8.4.dist-info}/top_level.txt +0 -0
sempy_labs/_capacities.py CHANGED
@@ -37,6 +37,8 @@ def create_fabric_capacity(
37
37
  """
38
38
  This function creates a new Fabric capacity within an Azure subscription.
39
39
 
40
+ This is a wrapper function for the following API: `Fabric Capacities - Create Or Update <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/create-or-update?view=rest-microsoftfabric-2023-11-01>`_.
41
+
40
42
  Parameters
41
43
  ----------
42
44
  capacity_name : str
@@ -253,6 +255,8 @@ def suspend_fabric_capacity(
253
255
  """
254
256
  This function suspends a Fabric capacity.
255
257
 
258
+ This is a wrapper function for the following API: `Fabric Capacities - Suspend <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/suspend?view=rest-microsoftfabric-2023-11-01>`_.
259
+
256
260
  Parameters
257
261
  ----------
258
262
  capacity_name : str
@@ -286,7 +290,7 @@ def suspend_fabric_capacity(
286
290
  if response.status_code != 202:
287
291
  raise FabricHTTPException(response)
288
292
 
289
- print(f"{icons.green_dot} The '{capacity_name} capacity has been suspended.")
293
+ print(f"{icons.green_dot} The '{capacity_name}' capacity has been suspended.")
290
294
 
291
295
 
292
296
  def resume_fabric_capacity(
@@ -301,6 +305,8 @@ def resume_fabric_capacity(
301
305
  """
302
306
  This function resumes a Fabric capacity.
303
307
 
308
+ This is a wrapper function for the following API: `Fabric Capacities - Resume <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/resume?view=rest-microsoftfabric-2023-11-01>`_.
309
+
304
310
  Parameters
305
311
  ----------
306
312
  capacity_name : str
@@ -335,7 +341,7 @@ def resume_fabric_capacity(
335
341
  if response.status_code != 202:
336
342
  raise FabricHTTPException(response)
337
343
 
338
- print(f"{icons.green_dot} The '{capacity_name} capacity has been resumed.")
344
+ print(f"{icons.green_dot} The '{capacity_name}' capacity has been resumed.")
339
345
 
340
346
 
341
347
  def delete_embedded_capacity(
@@ -384,7 +390,7 @@ def delete_embedded_capacity(
384
390
  if response.status_code not in [200, 202]:
385
391
  raise FabricHTTPException(response)
386
392
 
387
- print(f"{icons.green_dot} The '{capacity_name} capacity has been deleted.")
393
+ print(f"{icons.green_dot} The '{capacity_name}' capacity has been deleted.")
388
394
 
389
395
 
390
396
  def delete_premium_capacity(capacity_name: str):
@@ -427,6 +433,8 @@ def delete_fabric_capacity(
427
433
  """
428
434
  This function deletes a Fabric capacity.
429
435
 
436
+ This is a wrapper function for the following API: `Fabric Capacities - Delete <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/delete?view=rest-microsoftfabric-2023-11-01>`_.
437
+
430
438
  Parameters
431
439
  ----------
432
440
  capacity_name : str
@@ -461,7 +469,7 @@ def delete_fabric_capacity(
461
469
  if response.status_code != 202:
462
470
  raise FabricHTTPException(response)
463
471
 
464
- print(f"{icons.green_dot} The '{capacity_name} capacity has been deleted.")
472
+ print(f"{icons.green_dot} The '{capacity_name}' capacity has been deleted.")
465
473
 
466
474
 
467
475
  def update_fabric_capacity(
@@ -479,6 +487,8 @@ def update_fabric_capacity(
479
487
  """
480
488
  This function updates a Fabric capacity's properties.
481
489
 
490
+ This is a wrapper function for the following API: `Fabric Capacities - Update <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/update?view=rest-microsoftfabric-2023-11-01>`_.
491
+
482
492
  Parameters
483
493
  ----------
484
494
  capacity_name : str
@@ -521,26 +531,47 @@ def update_fabric_capacity(
521
531
 
522
532
  url = f"https://management.azure.com/subscriptions/{azure_subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Fabric/capacities/{capacity_name}?api-version={icons.azure_api_version}"
523
533
 
534
+ get_response = requests.get(url, headers=headers)
535
+ if get_response.status_code != 200:
536
+ raise FabricHTTPException(get_response)
537
+
538
+ get_json = get_response.json()
539
+ current_sku = get_json.get("sku", {}).get("name")
540
+ current_admins = (
541
+ get_json.get("properties", {}).get("administration", {}).get("members")
542
+ )
543
+ current_tags = get_json.get("tags")
544
+
524
545
  payload = {}
546
+ payload["sku"] = {
547
+ "name": current_sku,
548
+ "tier": "Fabric",
549
+ }
550
+ payload["tags"] = current_tags
551
+ payload["properties"] = get_json["properties"]
552
+
525
553
  if sku is not None:
526
- payload["sku"] = {"name": sku, "tier": "Fabric"}
554
+ payload["sku"]["name"] = sku
527
555
  if admin_members is not None:
528
- payload["properties"] = {"administration": {"members": [admin_members]}}
529
-
530
- payload = _add_sll_tag(payload, tags)
556
+ payload["properties"] = {"administration": {"members": admin_members}}
557
+ if tags is not None:
558
+ payload["tags"] = tags
531
559
 
532
- if payload == {}:
533
- raise ValueError(
534
- f"{icons.warning} No parameters have been set to update the '{capacity_name}' capacity."
560
+ # Do not proceed if no properties are being changed
561
+ if current_sku == sku and current_admins == admin_members and current_tags == tags:
562
+ print(
563
+ f"{icons.yellow_dot} The properties of the '{capacity_name}' are the same as those specified in the parameters of this function. No changes have been made."
535
564
  )
565
+ return
536
566
 
537
- response = requests.patch(url, headers=headers, data=payload)
567
+ payload = _add_sll_tag(payload, tags)
568
+ response = requests.patch(url, headers=headers, json=payload)
538
569
 
539
570
  if response.status_code != 202:
540
571
  raise FabricHTTPException(response)
541
572
 
542
573
  print(
543
- f"{icons.green_dot} The '{capacity_name} capacity has been updated accordingly."
574
+ f"{icons.green_dot} The '{capacity_name}' capacity has been updated accordingly."
544
575
  )
545
576
 
546
577
 
@@ -556,6 +587,8 @@ def check_fabric_capacity_name_availablility(
556
587
  """
557
588
  This function updates a Fabric capacity's properties.
558
589
 
590
+ This is a wrapper function for the following API: `Fabric Capacities - Check Name Availability <https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities/check-name-availability?view=rest-microsoftfabric-2023-11-01>`_.
591
+
559
592
  Parameters
560
593
  ----------
561
594
  capacity_name : str
@@ -611,6 +644,8 @@ def create_resource_group(
611
644
  """
612
645
  This function creates a resource group in a region within an Azure subscription.
613
646
 
647
+ This is a wrapper function for the following API: `ResourceGroupsOperations Class - CreateOrUpdate <https://learn.microsoft.com/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcegroupsoperations?view=azure-python#azure-mgmt-resource-resources-v2022-09-01-operations-resourcegroupsoperations-create-or-update>`_.
648
+
614
649
  Parameters
615
650
  ----------
616
651
  azure_subscription_id : str
@@ -631,7 +666,7 @@ def create_resource_group(
631
666
 
632
667
  from azure.mgmt.resource import ResourceManagementClient
633
668
 
634
- azure_token, credential, headers = get_azure_token_credentials(
669
+ azure_token, credential, headers = _get_azure_token_credentials(
635
670
  key_vault_uri=key_vault_uri,
636
671
  key_vault_tenant_id=key_vault_tenant_id,
637
672
  key_vault_client_id=key_vault_client_id,
@@ -632,7 +632,6 @@ def migrate_fabric_trial_capacity(
632
632
  source_capacity: str,
633
633
  target_capacity: str,
634
634
  target_capacity_sku: str = "F64",
635
- target_capacity_region: Optional[str] = None,
636
635
  target_capacity_admin_members: Optional[str | List[str]] = None,
637
636
  ):
638
637
  """
@@ -658,9 +657,6 @@ def migrate_fabric_trial_capacity(
658
657
  The name of the new Fabric capacity (F SKU). If this capacity does not exist, it will be created.
659
658
  target_capacity_sku : str, default="F64"
660
659
  If the target capacity does not exist, this property sets the SKU size for the target capacity.
661
- target_capacity_region : str, default=None
662
- If the target capacity does not exist, this property sets the region for the target capacity.
663
- Defaults to None which resolves to the region in which the Trial SKU exists.
664
660
  target_capacity_admin_members : str, default=None
665
661
  If the target capacity does not exist, this property sets the admin members for the target capacity.
666
662
  Defaults to None which resolves to the admin members on the Trial SKU.
@@ -691,9 +687,7 @@ def migrate_fabric_trial_capacity(
691
687
  )
692
688
  return
693
689
 
694
- # Use same region as source capacity if no region is specified
695
- if target_capacity_region is None:
696
- target_capacity_region = dfC_filt["Region"].iloc[0]
690
+ target_capacity_region = dfC_filt["Region"].iloc[0]
697
691
 
698
692
  # Use same admins as source capacity
699
693
  if isinstance(target_capacity_admin_members, str):
@@ -15,6 +15,8 @@ def list_data_pipelines(workspace: Optional[str] = None) -> pd.DataFrame:
15
15
  """
16
16
  Shows the data pipelines within a workspace.
17
17
 
18
+ This is a wrapper function for the following API: `Items - List Data Pipelines <https://learn.microsoft.com/rest/api/fabric/datapipeline/items/list-data-pipelines`_.
19
+
18
20
  Parameters
19
21
  ----------
20
22
  workspace : str, default=None
@@ -57,6 +59,8 @@ def create_data_pipeline(
57
59
  """
58
60
  Creates a Fabric data pipeline.
59
61
 
62
+ This is a wrapper function for the following API: `Items - Create Data Pipeline <https://learn.microsoft.com/rest/api/fabric/datapipeline/items/create-data-pipeline`_.
63
+
60
64
  Parameters
61
65
  ----------
62
66
  name: str
@@ -92,6 +96,8 @@ def delete_data_pipeline(name: str, workspace: Optional[str] = None):
92
96
  """
93
97
  Deletes a Fabric data pipeline.
94
98
 
99
+ This is a wrapper function for the following API: `Items - Delete Data Pipeline <https://learn.microsoft.com/rest/api/fabric/datapipeline/items/delete-data-pipeline`_.
100
+
95
101
  Parameters
96
102
  ----------
97
103
  name: str
sempy_labs/_dataflows.py CHANGED
@@ -59,6 +59,8 @@ def assign_workspace_to_dataflow_storage(
59
59
  """
60
60
  Assigns a dataflow storage account to a workspace.
61
61
 
62
+ This is a wrapper function for the following API: `Dataflow Storage Accounts - Groups AssignToDataflowStorage <https://learn.microsoft.com/rest/api/power-bi/dataflow-storage-accounts/groups-assign-to-dataflow-storage`_.
63
+
62
64
  Parameters
63
65
  ----------
64
66
  dataflow_storage_account : str
@@ -99,6 +101,8 @@ def list_dataflow_storage_accounts() -> pd.DataFrame:
99
101
  """
100
102
  Shows the accessible dataflow storage accounts.
101
103
 
104
+ This is a wrapper function for the following API: `Dataflow Storage Accounts - Get Dataflow Storage Accounts <https://learn.microsoft.com/rest/api/power-bi/dataflow-storage-accounts/get-dataflow-storage-accounts`_.
105
+
102
106
  Returns
103
107
  -------
104
108
  pandas.DataFrame
@@ -11,6 +11,8 @@ 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`_.
15
+
14
16
  Returns
15
17
  -------
16
18
  pandas.DataFrame
@@ -45,6 +47,8 @@ def list_deployment_pipeline_stages(deployment_pipeline: str) -> pd.DataFrame:
45
47
  """
46
48
  Shows the specified deployment pipeline stages.
47
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`_.
51
+
48
52
  Parameters
49
53
  ----------
50
54
  deployment_pipeline : str
@@ -84,13 +88,13 @@ def list_deployment_pipeline_stages(deployment_pipeline: str) -> pd.DataFrame:
84
88
  for r in responses:
85
89
  for v in r.get("value", []):
86
90
  new_data = {
87
- "Deployment Pipeline Stage Id": v["id"],
88
- "Deployment Pipeline Stage Name": v["displayName"],
89
- "Description": v["description"],
90
- "Order": v["order"],
91
- "Workspace Id": v["workspaceId"],
92
- "Workspace Name": v["workspaceName"],
93
- "Public": v["isPublic"],
91
+ "Deployment Pipeline Stage Id": v.get("id"),
92
+ "Deployment Pipeline Stage Name": v.get("displayName"),
93
+ "Description": v.get("description"),
94
+ "Order": v.get("order"),
95
+ "Workspace Id": v.get("workspaceId"),
96
+ "Workspace Name": v.get("workspaceName"),
97
+ "Public": v.get("isPublic"),
94
98
  }
95
99
  df = pd.concat([df, pd.DataFrame(new_data, index=[0])], ignore_index=True)
96
100
 
@@ -106,6 +110,8 @@ def list_deployment_pipeline_stage_items(
106
110
  """
107
111
  Shows the supported items from the workspace assigned to the specified stage of the specified deployment pipeline.
108
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`_.
114
+
109
115
  Parameters
110
116
  ----------
111
117
  deployment_pipeline : str
@@ -16,6 +16,8 @@ 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`_.
20
+
19
21
  Parameters
20
22
  ----------
21
23
  environment: str
@@ -51,6 +53,8 @@ def list_environments(workspace: Optional[str] = None) -> pd.DataFrame:
51
53
  """
52
54
  Shows the environments within a workspace.
53
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`_.
57
+
54
58
  Parameters
55
59
  ----------
56
60
  workspace : str, default=None
@@ -91,6 +95,8 @@ def delete_environment(environment: str, workspace: Optional[str] = None):
91
95
  """
92
96
  Deletes a Fabric environment.
93
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`_.
99
+
94
100
  Parameters
95
101
  ----------
96
102
  environment: str
@@ -16,6 +16,8 @@ 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`_.
20
+
19
21
  Parameters
20
22
  ----------
21
23
  name: str
@@ -51,6 +53,8 @@ def list_eventhouses(workspace: Optional[str] = None) -> pd.DataFrame:
51
53
  """
52
54
  Shows the eventhouses within a workspace.
53
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`_.
57
+
54
58
  Parameters
55
59
  ----------
56
60
  workspace : str, default=None
@@ -91,6 +95,8 @@ def delete_eventhouse(name: str, workspace: Optional[str] = None):
91
95
  """
92
96
  Deletes a Fabric eventhouse.
93
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`_.
99
+
94
100
  Parameters
95
101
  ----------
96
102
  name: str
@@ -14,6 +14,8 @@ 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`_.
18
+
17
19
  Parameters
18
20
  ----------
19
21
  workspace : str, default=None
@@ -56,6 +58,8 @@ def create_eventstream(
56
58
  """
57
59
  Creates a Fabric eventstream.
58
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`_.
62
+
59
63
  Parameters
60
64
  ----------
61
65
  name: str
@@ -91,6 +95,8 @@ def delete_eventstream(name: str, workspace: Optional[str] = None):
91
95
  """
92
96
  Deletes a Fabric eventstream.
93
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`_.
99
+
94
100
  Parameters
95
101
  ----------
96
102
  name: str
@@ -20,6 +20,8 @@ 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`_.
24
+
23
25
  Parameters
24
26
  ----------
25
27
  item_name : str
@@ -71,6 +73,8 @@ def revoke_external_data_share(
71
73
  """
72
74
  Revokes the specified external data share. Note: This action cannot be undone.
73
75
 
76
+ This is a wrapper function for the following API: `External Data Shares - Revoke External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/revoke-external-data-share`_.
77
+
74
78
  Parameters
75
79
  ----------
76
80
  external_data_share_id : UUID
@@ -85,8 +89,6 @@ def revoke_external_data_share(
85
89
  or if no lakehouse attached, resolves to the workspace of the notebook.
86
90
  """
87
91
 
88
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/external-data-shares/revoke-external-data-share?tabs=HTTP
89
-
90
92
  (workspace, workspace_id) = resolve_workspace_name_and_id(workspace)
91
93
  item_id = fabric.resolve_item_id(
92
94
  item_name=item_name, type=item_type, workspace=workspace
@@ -111,6 +113,8 @@ def list_external_data_shares_in_item(
111
113
  """
112
114
  Returns a list of the external data shares that exist for the specified item.
113
115
 
116
+ This is a wrapper function for the following API: `External Data Shares - List External Data Shares In Item <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/list-external-data-shares-in-item`_.
117
+
114
118
  Parameters
115
119
  ----------
116
120
  item_name : str
@@ -128,8 +132,6 @@ def list_external_data_shares_in_item(
128
132
  A pandas dataframe showing a list of the external data shares that exist for the specified item.
129
133
  """
130
134
 
131
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/external-data-shares/list-external-data-shares-in-item?tabs=HTTP
132
-
133
135
  (workspace, workspace_id) = resolve_workspace_name_and_id(workspace)
134
136
  item_id = fabric.resolve_item_id(
135
137
  item_name=item_name, type=item_type, workspace=workspace
@@ -64,11 +64,28 @@ def create_blank_semantic_model(
64
64
  "name": '{dataset}',
65
65
  "compatibilityLevel": {compatibility_level},
66
66
  "model": {{
67
- "culture": "en-US",
68
- "defaultPowerBIDataSourceVersion": "powerBI_V3"
67
+ "cultures": [
68
+ {{
69
+ "name": "en-US",
70
+ "linguisticMetadata": {{
71
+ "content": {{
72
+ "Version": "1.0.0",
73
+ "Language": "en-US"
74
+ }},
75
+ "contentType": "json"
76
+ }}
77
+ }}
78
+ ],
79
+ "collation": "Latin1_General_100_BIN2_UTF8",
80
+ "dataAccessOptions": {{
81
+ "legacyRedirects": true,
82
+ "returnErrorValuesAsNull": true,
83
+ }},
84
+ "defaultPowerBIDataSourceVersion": "powerBI_V3",
85
+ "sourceQueryCulture": "en-US",
86
+ }}
69
87
  }}
70
88
  }}
71
- }}
72
89
  }}
73
90
  """
74
91
 
@@ -85,6 +102,8 @@ def create_semantic_model_from_bim(
85
102
  """
86
103
  Creates a new semantic model based on a Model.bim file.
87
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`_.
106
+
88
107
  Parameters
89
108
  ----------
90
109
  dataset : str
@@ -149,6 +168,8 @@ def update_semantic_model_from_bim(
149
168
  """
150
169
  Updates a semantic model definition based on a Model.bim file.
151
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`_.
172
+
152
173
  Parameters
153
174
  ----------
154
175
  dataset : str
@@ -287,6 +308,8 @@ def get_semantic_model_bim(
287
308
  """
288
309
  Extracts the Model.bim file for a given semantic model.
289
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`_.
312
+
290
313
  Parameters
291
314
  ----------
292
315
  dataset : str
sempy_labs/_git.py CHANGED
@@ -21,6 +21,8 @@ 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`_.
25
+
24
26
  Parameters
25
27
  ----------
26
28
  organization_name : str
@@ -41,8 +43,6 @@ def connect_workspace_to_git(
41
43
  or if no lakehouse attached, resolves to the workspace of the notebook.
42
44
  """
43
45
 
44
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/connect?tabs=HTTP
45
-
46
46
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
47
47
 
48
48
  request_body = {
@@ -72,6 +72,8 @@ 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`_.
76
+
75
77
  Parameters
76
78
  ----------
77
79
  workspace : str, default=None
@@ -80,8 +82,6 @@ def disconnect_workspace_from_git(workspace: Optional[str] = None):
80
82
  or if no lakehouse attached, resolves to the workspace of the notebook.
81
83
  """
82
84
 
83
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/disconnect?tabs=HTTP
84
-
85
85
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
86
86
 
87
87
  client = fabric.FabricRestClient()
@@ -98,6 +98,8 @@ 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`_.
102
+
101
103
  Parameters
102
104
  ----------
103
105
  workspace : str, default=None
@@ -111,8 +113,6 @@ def get_git_status(workspace: Optional[str] = None) -> pd.DataFrame:
111
113
  A pandas dataframe showing the Git status of items in the workspace.
112
114
  """
113
115
 
114
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/get-status?tabs=HTTP
115
-
116
116
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
117
117
 
118
118
  df = pd.DataFrame(
@@ -161,6 +161,8 @@ 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`_.
165
+
164
166
  Parameters
165
167
  ----------
166
168
  workspace : str, default=None
@@ -174,8 +176,6 @@ def get_git_connection(workspace: Optional[str] = None) -> pd.DataFrame:
174
176
  A pandas dataframe showing the Git status of items in the workspace.
175
177
  """
176
178
 
177
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/get-status?tabs=HTTP
178
-
179
179
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
180
180
 
181
181
  df = pd.DataFrame(
@@ -221,6 +221,8 @@ 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`_.
225
+
224
226
  Parameters
225
227
  ----------
226
228
  workspace : str, default=None
@@ -229,8 +231,6 @@ def initialize_git_connection(workspace: Optional[str] = None):
229
231
  or if no lakehouse attached, resolves to the workspace of the notebook.
230
232
  """
231
233
 
232
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/initialize-connection?tabs=HTTP
233
-
234
234
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
235
235
 
236
236
  client = fabric.FabricRestClient()
@@ -252,6 +252,8 @@ 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`_.
256
+
255
257
  Parameters
256
258
  ----------
257
259
  comment : str
@@ -265,8 +267,6 @@ def commit_to_git(
265
267
  or if no lakehouse attached, resolves to the workspace of the notebook.
266
268
  """
267
269
 
268
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/commit-to-git?tabs=HTTP
269
-
270
270
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
271
271
 
272
272
  gs = get_git_status(workspace=workspace)
@@ -320,6 +320,8 @@ 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`_.
324
+
323
325
  Parameters
324
326
  ----------
325
327
  workspace_head : str
@@ -336,8 +338,6 @@ def update_from_git(
336
338
  or if no lakehouse attached, resolves to the workspace of the notebook.
337
339
  """
338
340
 
339
- # https://learn.microsoft.com/en-us/rest/api/fabric/core/git/update-from-git?tabs=HTTP
340
-
341
341
  workspace, workspace_id = resolve_workspace_name_and_id(workspace)
342
342
 
343
343
  conflict_resolution_policies = ["PreferWorkspace", "PreferRemote"]