semantic-link-labs 0.7.4__py3-none-any.whl → 0.8.0__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 (32) hide show
  1. {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.0.dist-info}/METADATA +7 -3
  2. {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.0.dist-info}/RECORD +32 -23
  3. {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.0.dist-info}/WHEEL +1 -1
  4. sempy_labs/__init__.py +57 -18
  5. sempy_labs/_capacities.py +39 -3
  6. sempy_labs/_capacity_migration.py +624 -0
  7. sempy_labs/_clear_cache.py +8 -8
  8. sempy_labs/_connections.py +15 -13
  9. sempy_labs/_git.py +20 -21
  10. sempy_labs/_helper_functions.py +33 -30
  11. sempy_labs/_icons.py +19 -0
  12. sempy_labs/_list_functions.py +210 -0
  13. sempy_labs/_model_bpa.py +1 -1
  14. sempy_labs/_query_scale_out.py +4 -3
  15. sempy_labs/_spark.py +31 -36
  16. sempy_labs/_sql.py +60 -15
  17. sempy_labs/_vertipaq.py +9 -7
  18. sempy_labs/admin/__init__.py +53 -0
  19. sempy_labs/admin/_basic_functions.py +806 -0
  20. sempy_labs/admin/_domains.py +411 -0
  21. sempy_labs/directlake/_generate_shared_expression.py +11 -14
  22. sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py +14 -24
  23. sempy_labs/report/__init__.py +9 -6
  24. sempy_labs/report/_report_bpa.py +359 -0
  25. sempy_labs/report/_report_bpa_rules.py +113 -0
  26. sempy_labs/report/_report_helper.py +254 -0
  27. sempy_labs/report/_report_list_functions.py +95 -0
  28. sempy_labs/report/_report_rebind.py +0 -4
  29. sempy_labs/report/_reportwrapper.py +2039 -0
  30. sempy_labs/tom/_model.py +78 -4
  31. {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.0.dist-info}/LICENSE +0 -0
  32. {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: semantic-link-labs
3
- Version: 0.7.4
3
+ Version: 0.8.0
4
4
  Summary: Semantic Link Labs for Microsoft Fabric
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -20,13 +20,14 @@ Requires-Dist: anytree
20
20
  Requires-Dist: powerbiclient
21
21
  Requires-Dist: polib
22
22
  Requires-Dist: azure.mgmt.resource
23
+ Requires-Dist: jsonpath-ng
23
24
  Provides-Extra: test
24
25
  Requires-Dist: pytest >=8.2.1 ; extra == 'test'
25
26
 
26
27
  # Semantic Link Labs
27
28
 
28
29
  [![PyPI version](https://badge.fury.io/py/semantic-link-labs.svg)](https://badge.fury.io/py/semantic-link-labs)
29
- [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.7.4&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
30
+ [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.8.0&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
30
31
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
31
32
  [![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)
32
33
 
@@ -50,11 +51,13 @@ If you have ideas for new features/functions, please [request a feature](https:/
50
51
  ## Once installed, run this code to import the library into your notebook
51
52
  ```python
52
53
  import sempy_labs as labs
53
- from sempy_labs import migration, directlake
54
+ from sempy_labs import migration, directlake, admin
54
55
  from sempy_labs import lakehouse as lake
55
56
  from sempy_labs import report as rep
56
57
  from sempy_labs.tom import connect_semantic_model
58
+ from sempy_labs.report import ReportWrapper
57
59
  from sempy_labs import ConnectWarehouse
60
+ from sempy_labs import ConnectLakehouse
58
61
  ```
59
62
 
60
63
  ## Load semantic-link-labs into a custom [Fabric environment](https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment)
@@ -78,6 +81,7 @@ An even better way to ensure the semantic-link-labs library is available in your
78
81
  2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
79
82
 
80
83
  ## Version History
84
+ * [0.8.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.0) (September 24, 2024)
81
85
  * [0.7.4](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.4) (September 16, 2024)
82
86
  * [0.7.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.3) (September 11, 2024)
83
87
  * [0.7.2](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.2) (August 30, 2024)
@@ -1,30 +1,31 @@
1
- sempy_labs/__init__.py,sha256=MrhalsEp7LHtS1adnSQePzqqrggh26vlVWo7Aj267Qs,8267
1
+ sempy_labs/__init__.py,sha256=YDYIiHI4wCOL_2iC-VPO6NOCchdulTKwjkb6b8-qrqE,9538
2
2
  sempy_labs/_ai.py,sha256=CjlFebT35Rzbw90BmsDy7PjLiAZMZ-B7wZ_EoI444bw,16271
3
- sempy_labs/_capacities.py,sha256=WtqUQkkVoRPTqmT6yRnIo4qtK2_Smw-dfntVy1Ju5TM,18981
4
- sempy_labs/_clear_cache.py,sha256=4mDsh7s1FScZ548u_pU75OD68vjXSUQv8BPpAdmFVRk,12570
5
- sempy_labs/_connections.py,sha256=G-djzgD4kIwAozUDPsEJ4Feote3LB2NbNQWkWOnFTEo,12194
3
+ sempy_labs/_capacities.py,sha256=X39LHYde3rgwW8vTbNUMt2S9dekTfy6sqQGXg-MCybY,20132
4
+ sempy_labs/_capacity_migration.py,sha256=0m_yXrdQ1F5tAFsPJ5RXC_6LzAxpxgMQs8IwqPggXZ8,23632
5
+ sempy_labs/_clear_cache.py,sha256=JgY4Nio7Zy9YHOPxQseiZ5lJLWEi5s3Qn5SLSvuyBwo,12490
6
+ sempy_labs/_connections.py,sha256=w1NeC9auc07ko2pY3m5vM_9-sgW_chw1OxPzDviVC5k,12179
6
7
  sempy_labs/_dataflows.py,sha256=ApGMklXMQZQssYa7egxlBtsYz5mcR3JS69ZgeORXVBM,4051
7
8
  sempy_labs/_dax.py,sha256=dt1GgHceyM7f6phRBPxRKnmQy_KYKpcgFQHuOjGbpLo,2029
8
9
  sempy_labs/_deployment_pipelines.py,sha256=-wjqQieR25BR-0r2QfTzg4QuFzOgcayZLnS-fNYIPPU,5347
9
10
  sempy_labs/_environments.py,sha256=oyfEeOLX5XPevumj4Il5t1z2gmsR8xm6pg1wfGoutMc,4821
10
11
  sempy_labs/_generate_semantic_model.py,sha256=j6cwxwjMZcYdu6jlvROY_tVk20LxNiD6roV0bM6fE-I,13283
11
- sempy_labs/_git.py,sha256=zjL1sF0UhN3ALLTHIL2E1m3Ibu4_lPrpL37WDj9P1UI,12771
12
- sempy_labs/_helper_functions.py,sha256=wzLq0kSEZiFP6i4gV3aTGSb205vhbI24tdHPHQ8D8Nw,30548
13
- sempy_labs/_icons.py,sha256=owo5plzAPqzPruDzhofuEtYpj1GHPI0IEud4TEZhLGQ,1893
14
- sempy_labs/_list_functions.py,sha256=ZBudlv86HE3WgNGhPslANhwFO3LiC0h5YRa1cpj3TAU,60147
12
+ sempy_labs/_git.py,sha256=vV8ho0Q9e4BRaNY9XXaIUlNDQlTzmqsHbj3YGYBtoXU,12695
13
+ sempy_labs/_helper_functions.py,sha256=Cd0ArhAeX3BVT08z3N7h_oBq2aVcM_w-9_bEPaLdgaI,30505
14
+ sempy_labs/_icons.py,sha256=8Hq8ZcqXn0S_DIFhFCr_w2ThRM3s6isBikdZ7xYDWK4,2241
15
+ sempy_labs/_list_functions.py,sha256=qx-IVPHhlNNk4ZJ61BNJtJlatChoao_Jjup8EIegofU,68074
15
16
  sempy_labs/_model_auto_build.py,sha256=fX3bCLFCOMQHuheKIoB48fUABG7XAT7qqsMbUiWSrY0,5071
16
- sempy_labs/_model_bpa.py,sha256=17NP6X3Oo_OtMSf07qrKmT0I2aM2G5MZSXEbMdq65Mw,20436
17
+ sempy_labs/_model_bpa.py,sha256=pfrD1OUsiJGWLG41U4zBPybqo_87nf6igurYJY2Sdd0,20437
17
18
  sempy_labs/_model_bpa_bulk.py,sha256=SUps0bHJnRjLCrqUJoblfGjrJ-8YdgdD8-RgWJyXrP0,15053
18
19
  sempy_labs/_model_bpa_rules.py,sha256=B8hg3_ktS5ql859nL3e9kdV8fNDBgMNO5j2hGrXp6po,44855
19
20
  sempy_labs/_model_dependencies.py,sha256=nZdqq2iMhZejnS_LCd2rpK6r1B7jWpa3URkxobRPifY,12986
20
21
  sempy_labs/_notebooks.py,sha256=5d7YBV5UGHMjJ-OlhqKFBsbCYLK8kU8cZe-oMM5vsCA,4604
21
22
  sempy_labs/_one_lake_integration.py,sha256=eIuLxlw8eXfUH2avKhsyLmXZbTllSwGsz2j_HMAikpQ,6234
22
- sempy_labs/_query_scale_out.py,sha256=Kr_likU4DZP2W6GzdlCG_pac_R5YVKXe4UqgpDiK0vo,15296
23
+ sempy_labs/_query_scale_out.py,sha256=g9JKdegaAY9DqgR5-LFV88DF90KGni79P8o-4rqFFDc,15273
23
24
  sempy_labs/_refresh_semantic_model.py,sha256=2qzP9KqmwA20RuL1o6Lt9bIjC-KtdX8ZgcTvJParg-w,7157
24
- sempy_labs/_spark.py,sha256=p65I51rjM6btXcJcOBLNv3eSoChMik7zwo1rre1vWl8,20488
25
- sempy_labs/_sql.py,sha256=eDNjtOaXxo0q68k_jy_ceDADoUb6QC-ykhjxf6WE3fw,4218
25
+ sempy_labs/_spark.py,sha256=rYOkAI9J3nAnGf5dZj1GMqTYU_-_KuySesSMEI1fWuk,20343
26
+ sempy_labs/_sql.py,sha256=p0CvDD3fF0IQdoFI6308-DDUFQR9V_qWpXfQvyX3znw,5356
26
27
  sempy_labs/_translations.py,sha256=ocRtdgymcPYOT3jiYcVv9ze5i2gDjgLcTJBEl66pKtg,19771
27
- sempy_labs/_vertipaq.py,sha256=DfvuqWnCR-rLliKtyjeDqEk9TtUgY9uXnPt4tEUzQQE,35690
28
+ sempy_labs/_vertipaq.py,sha256=3tdjnvXSKlrd9ULqzjTQdgjNkuizgFYWVBrM65qr1AY,35845
28
29
  sempy_labs/_workspace_identity.py,sha256=2uum6Ojv1x3Zzp8JEAQ2ER9J5yafb_v_TgZwY5vdBwA,2120
29
30
  sempy_labs/_workspaces.py,sha256=w_6sImSwZRun-aTwwlLNEBC0rQIjCWZ51VWs90mxge4,10105
30
31
  sempy_labs/_bpa_translation/_model/_translations_am-ET.po,sha256=ve23guQ48HXXn2_yGicUtr_Orhi9nth_lna8-x93GjA,37928
@@ -65,17 +66,20 @@ sempy_labs/_bpa_translation/_model/_translations_tr-TR.po,sha256=YfcgHAiP0RK2hit
65
66
  sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=t7kpMB65cOKNIg8rD8KJPqi9uxmqgY3c66sM19ec-Kg,41959
66
67
  sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=QhmS3HSnILLN-OgMUGmNFvGr4TEhoH1FKL0F1SgU2nk,26035
67
68
  sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=0ZivJJa-ggc7PJqLAgDmi8OGGUGzEcleGPmlLL9YYb4,30495
69
+ sempy_labs/admin/__init__.py,sha256=whrBFHvjWav0ni_LOYJ4Q63WtiJEPOQ1etudl2wiWKA,1445
70
+ sempy_labs/admin/_basic_functions.py,sha256=7nnOU9FMlk2WoqySNb25v3A4TvvHM-SAyBJVL63OXv4,26643
71
+ sempy_labs/admin/_domains.py,sha256=OgV0TC3a7sXKDX7RSVrzWh3KAWonGyr8FpuaGtiDq8Y,11701
68
72
  sempy_labs/directlake/__init__.py,sha256=ZlpQQDdA5-C10zSf9YICH0waMIFM-55aacsEzvpuHEM,2047
69
73
  sempy_labs/directlake/_directlake_schema_compare.py,sha256=ocHFU6E6HSKgcNLywGM0dx0ie9AXYwk-E7o7EYcqiN4,4422
70
74
  sempy_labs/directlake/_directlake_schema_sync.py,sha256=BxOB0SvDEa9pHAUD2jF1xZKE_BzPkkptQU2Q1SxYTkE,4329
71
75
  sempy_labs/directlake/_dl_helper.py,sha256=jQtrsNrhJcjKJReX0J5lHk7cswb0S5HtikBjs8Vg2D4,8575
72
- sempy_labs/directlake/_generate_shared_expression.py,sha256=AoYA7esIFPRA_qYs3aUpaTA3lQE1kYKXEXycsjkon2A,3061
76
+ sempy_labs/directlake/_generate_shared_expression.py,sha256=ayMkgmlmFzDTYrqbXGm5C3w05YDkI4SYnyi1eaIo9Vs,3087
73
77
  sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=sovI4ds2SEgkp4Fi465jtJ4seRvQxdYgcixRDvsUwNM,2321
74
78
  sempy_labs/directlake/_get_shared_expression.py,sha256=Xl2_GYqRll95cN7JjwLlULbcRXM71Ij9JkrYAp7cNJM,1943
75
79
  sempy_labs/directlake/_guardrails.py,sha256=0zqqkEDk02_jb4MzWJCKRNcDtfPGBcWUcxuQcDbgWns,2390
76
80
  sempy_labs/directlake/_list_directlake_model_calc_tables.py,sha256=_rpnbgsFAz2W16PpgIOB0Rj_Fs1ZKrDbz3DUaaR_bfU,2143
77
81
  sempy_labs/directlake/_show_unsupported_directlake_objects.py,sha256=-8werbzIi_xknMkymIsq-JwNTAvt0W18xA4HagXhT8U,3332
78
- sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=b_Y5_GSfWC25wH6R7L37-AHO9fvKkmxRGaP6dVDC7-w,3233
82
+ sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=LpxYPxF_rkLD2okyKejLIV-qA8UeJ9xRWyv32kNdR_c,2822
79
83
  sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=Pbx7LCdKyqEfX1npLvhw0WzFnOEbluwB3_xW0ELvHL4,8580
80
84
  sempy_labs/directlake/_warm_cache.py,sha256=ZgPricISRszx-yDERXihBDGVhEFB9yX-nBtLX0ZJTXI,8258
81
85
  sempy_labs/lakehouse/__init__.py,sha256=6LVQltQ3cjyiuxvjXTuNdJ163zSqi4h_tEZY4zsxuSw,647
@@ -92,10 +96,15 @@ sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=TX0NIff
92
96
  sempy_labs/migration/_migration_validation.py,sha256=ZsUdVlBmo03ycaZE6fFRRGU6qpEDZ_lcN8C-iuAcC30,2738
93
97
  sempy_labs/migration/_refresh_calc_tables.py,sha256=eDj0OJQ07Tum4umZH0NsUW5Rx_YXEpGnAu8OVVoQ4yk,5190
94
98
  sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
95
- sempy_labs/report/__init__.py,sha256=GQcTHbB3SjLEeCH0id_jlmqQ7S1iPCpoISUQfAHI2T8,960
99
+ sempy_labs/report/__init__.py,sha256=LqbIi1SnB532l79ldsFbeIkk-6dEnWkJYgNCaF2IR08,1056
96
100
  sempy_labs/report/_generate_report.py,sha256=7H2xQ5nHDK1_2RjvNNHX3IwWyNSRbTGMpGWxMmmjdOk,12189
101
+ sempy_labs/report/_report_bpa.py,sha256=kkpg-7sMj8Ww9Wnwi2I-k64fNyiQxOaVj-IrMuVLDXA,13378
102
+ sempy_labs/report/_report_bpa_rules.py,sha256=tPVGA0hmE6QMLlWtig7Va7Ksr2yXWl_Lndq--tWWd6w,4959
97
103
  sempy_labs/report/_report_functions.py,sha256=qY2lE9tyf-xQo8Fdu2yl2nneiMMM6LFkwlqnyAOJjgg,29318
98
- sempy_labs/report/_report_rebind.py,sha256=qHyMn_Gnr08eWyEbQsmzJPFHpMVNV4YnWLg7-0b1YQc,5030
104
+ sempy_labs/report/_report_helper.py,sha256=fkSo5m3_KlAlo-fu8FTnxINigWbZI66ex-r44WalKsw,8711
105
+ sempy_labs/report/_report_list_functions.py,sha256=4k-bPEi4uW_ozHTZNc_67idP1LQZPT-gO9ToRCv06fk,3127
106
+ sempy_labs/report/_report_rebind.py,sha256=F1gXE-VM_812EFOfqbMDnAdynVfVKKx9Cvs31Hnuras,5004
107
+ sempy_labs/report/_reportwrapper.py,sha256=Cbq3IfuqSx-phfOmS3uZ1JeQdU3EaCdsK61W2-GBJkw,75802
99
108
  sempy_labs/report/_bpareporttemplate/.platform,sha256=kWRa6B_KwSYLsvVFDx372mQriQO8v7dJ_YzQV_cfD-Q,303
100
109
  sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
101
110
  sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json,sha256=kzjBlNdjbsSBBSHBwbQc298AJCr9Vp6Ex0D5PemUuT0,1578
@@ -126,9 +135,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
126
135
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
127
136
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
128
137
  sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
129
- sempy_labs/tom/_model.py,sha256=WRLKfAfkJnU9VbgiodHMPhoyKyUKGQjn71pYbRnHN4M,153002
130
- semantic_link_labs-0.7.4.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
131
- semantic_link_labs-0.7.4.dist-info/METADATA,sha256=mf5wKSSjeIOKQy9GIHxKrHs5v4XxUxprQaU5l1t1edo,12103
132
- semantic_link_labs-0.7.4.dist-info/WHEEL,sha256=5Mi1sN9lKoFv_gxcPtisEVrJZihrm_beibeg5R6xb4I,91
133
- semantic_link_labs-0.7.4.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
134
- semantic_link_labs-0.7.4.dist-info/RECORD,,
138
+ sempy_labs/tom/_model.py,sha256=H66LjyTt9XfVAsp24-7ApXE0IY07_KHkaKETacQLcos,156140
139
+ semantic_link_labs-0.8.0.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
140
+ semantic_link_labs-0.8.0.dist-info/METADATA,sha256=Cu4dCzJpSUKF25bk-MD3vrX8ag2ajT9zaRAxwHsUIUQ,12320
141
+ semantic_link_labs-0.8.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
142
+ semantic_link_labs-0.8.0.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
143
+ semantic_link_labs-0.8.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.0.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
sempy_labs/__init__.py CHANGED
@@ -3,6 +3,36 @@ from sempy_labs._environments import (
3
3
  delete_environment,
4
4
  publish_environment,
5
5
  )
6
+ from sempy_labs._clear_cache import (
7
+ clear_cache,
8
+ backup_semantic_model,
9
+ restore_semantic_model,
10
+ copy_semantic_model_backup_file,
11
+ list_backups,
12
+ list_storage_account_files,
13
+ )
14
+ from sempy_labs._capacity_migration import (
15
+ migrate_spark_settings,
16
+ migrate_workspaces,
17
+ migrate_capacities,
18
+ migrate_notification_settings,
19
+ migrate_access_settings,
20
+ migrate_delegated_tenant_settings,
21
+ migrate_capacity_settings,
22
+ migrate_disaster_recovery_settings,
23
+ )
24
+ from sempy_labs._capacities import (
25
+ create_fabric_capacity,
26
+ # get_capacity_resource_governance,
27
+ # list_vcores,
28
+ resume_fabric_capacity,
29
+ suspend_fabric_capacity,
30
+ update_fabric_capacity,
31
+ delete_fabric_capacity,
32
+ check_fabric_capacity_name_availablility,
33
+ delete_embedded_capacity,
34
+ delete_premium_capacity,
35
+ )
6
36
 
7
37
  from sempy_labs._spark import (
8
38
  get_spark_settings,
@@ -28,16 +58,7 @@ from sempy_labs._notebooks import (
28
58
  )
29
59
  from sempy_labs._sql import (
30
60
  ConnectWarehouse,
31
- )
32
- from sempy_labs._capacities import (
33
- check_fabric_capacity_name_availablility,
34
- delete_fabric_capacity,
35
- resume_fabric_capacity,
36
- update_fabric_capacity,
37
- create_fabric_capacity,
38
- delete_premium_capacity,
39
- suspend_fabric_capacity,
40
- delete_embedded_capacity,
61
+ ConnectLakehouse,
41
62
  )
42
63
  from sempy_labs._workspace_identity import (
43
64
  provision_workspace_identity,
@@ -62,14 +83,6 @@ from sempy_labs._dataflows import (
62
83
  assign_workspace_to_dataflow_storage,
63
84
  list_dataflows,
64
85
  )
65
- from sempy_labs._clear_cache import (
66
- clear_cache,
67
- backup_semantic_model,
68
- restore_semantic_model,
69
- copy_semantic_model_backup_file,
70
- list_backups,
71
- list_storage_account_files,
72
- )
73
86
  from sempy_labs._connections import (
74
87
  list_connections,
75
88
  list_item_connections,
@@ -88,6 +101,8 @@ from sempy_labs._generate_semantic_model import (
88
101
  )
89
102
  from sempy_labs._list_functions import (
90
103
  list_reports_using_semantic_model,
104
+ list_semantic_model_object_report_usage,
105
+ list_report_semantic_model_objects,
91
106
  list_semantic_model_objects,
92
107
  list_shortcuts,
93
108
  get_object_level_security,
@@ -116,6 +131,7 @@ from sempy_labs._helper_functions import (
116
131
  resolve_environment_id,
117
132
  resolve_capacity_id,
118
133
  resolve_warehouse_id,
134
+ resolve_dataset_from_report,
119
135
  resolve_workspace_capacity,
120
136
  create_abfss_path,
121
137
  format_dax_object_name,
@@ -175,6 +191,7 @@ from sempy_labs._vertipaq import (
175
191
  __all__ = [
176
192
  "resolve_warehouse_id",
177
193
  "ConnectWarehouse",
194
+ "ConnectLakehouse",
178
195
  "update_semantic_model_from_bim",
179
196
  "list_connections",
180
197
  "get_semantic_model_size",
@@ -186,6 +203,10 @@ __all__ = [
186
203
  "list_storage_account_files",
187
204
  "backup_semantic_model",
188
205
  "restore_semantic_model",
206
+ "list_semantic_model_object_report_usage",
207
+ "list_report_semantic_model_objects",
208
+ "migrate_spark_settings",
209
+ "create_azure_storage_account",
189
210
  "delete_custom_pool",
190
211
  "clear_cache",
191
212
  # create_connection_cloud,
@@ -301,4 +322,22 @@ __all__ = [
301
322
  "delete_premium_capacity",
302
323
  "suspend_fabric_capacity",
303
324
  "delete_embedded_capacity",
325
+ "resolve_dataset_from_report",
326
+ "migrate_workspaces",
327
+ "migrate_capacities",
328
+ "create_fabric_capacity",
329
+ "migrate_capacity_settings",
330
+ # "get_capacity_resource_governance",
331
+ # "list_vcores",
332
+ "migrate_disaster_recovery_settings",
333
+ "migrate_notification_settings",
334
+ "migrate_access_settings",
335
+ "migrate_delegated_tenant_settings",
336
+ "resume_fabric_capacity",
337
+ "suspend_fabric_capacity",
338
+ "update_fabric_capacity",
339
+ "delete_fabric_capacity",
340
+ "check_fabric_capacity_name_availablility",
341
+ "delete_embedded_capacity",
342
+ "delete_premium_capacity",
304
343
  ]
sempy_labs/_capacities.py CHANGED
@@ -5,6 +5,7 @@ import sempy_labs._icons as icons
5
5
  from sempy.fabric.exceptions import FabricHTTPException
6
6
  import requests
7
7
  from sempy_labs._helper_functions import get_azure_token_credentials
8
+ import pandas as pd
8
9
 
9
10
 
10
11
  def _add_sll_tag(payload, tags):
@@ -155,10 +156,10 @@ def create_fabric_capacity(
155
156
  for i in resource_client.resources.list(
156
157
  "resourceType eq 'Microsoft.PowerBIDedicated/capacities'"
157
158
  ):
158
- if i.name == capacity_name.removesuffix(capacity_suffix):
159
+ if i.name == capacity_name.removesuffix(icons.migrate_capacity_suffix):
159
160
  resource_group = i.id.split("/")[4]
160
161
  print(
161
- f"{icons.yellow_dot} Override resource group flag detected for A SKUs - using the existing resource group '{resource_group}' for capacity '{capacity_name}'"
162
+ f"{icons.yellow_dot} Override resource group flag detected for A SKUs - using the existing resource group '{resource_group}' for the '{capacity_name}' capacity."
162
163
  )
163
164
  else:
164
165
  # Attempt to get the resource group
@@ -207,6 +208,41 @@ def create_fabric_capacity(
207
208
  )
208
209
 
209
210
 
211
+ def list_vcores() -> pd.DataFrame:
212
+
213
+ df = pd.DataFrame(columns=["Total Purchased Cores", "Available Cores"])
214
+
215
+ client = fabric.PowerBIRestClient()
216
+ response = client.get("capacities/vcores")
217
+ if response.status_code != 200:
218
+ FabricHTTPException(response)
219
+ response_json = response.json()
220
+ new_data = {
221
+ "Total Purchased Cores": response_json.get("totalPurchasedCores"),
222
+ "Available Cores": response_json.get("availableCores"),
223
+ }
224
+ df = pd.concat([df, pd.DataFrame(new_data, index=[0])], ignore_index=True)
225
+
226
+ int_cols = ["Total Purchased Cores", "Available Cores"]
227
+ df[int_cols] = df[int_cols].astype(int)
228
+
229
+ return df
230
+
231
+
232
+ def get_capacity_resource_governance(capacity_name: str):
233
+
234
+ dfC = fabric.list_capacities()
235
+ dfC_filt = dfC[dfC["Display Name"] == capacity_name]
236
+ capacity_id = dfC_filt["Id"].iloc[0].upper()
237
+ client = fabric.PowerBIRestClient()
238
+ response = client.get(f"capacities/{capacity_id}/resourceGovernance")
239
+
240
+ if response.status_code != 200:
241
+ FabricHTTPException(response)
242
+
243
+ return response.json()["workloadSettings"]
244
+
245
+
210
246
  def suspend_fabric_capacity(
211
247
  capacity_name: str,
212
248
  azure_subscription_id: str,
@@ -375,7 +411,7 @@ def delete_premium_capacity(capacity_name: str):
375
411
  client = fabric.FabricRestClient()
376
412
  response = client.delete(f"capacities/{capacity_id}")
377
413
 
378
- if response.status_code != 200:
414
+ if response.status_code != 204:
379
415
  raise FabricHTTPException(response)
380
416
 
381
417
  print(f"{icons.green_dot} The '{capacity_name}' capacity has been deleted.")