semantic-link-labs 0.11.2__py3-none-any.whl → 0.11.3__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 (29) hide show
  1. {semantic_link_labs-0.11.2.dist-info → semantic_link_labs-0.11.3.dist-info}/METADATA +4 -4
  2. {semantic_link_labs-0.11.2.dist-info → semantic_link_labs-0.11.3.dist-info}/RECORD +26 -24
  3. sempy_labs/__init__.py +12 -18
  4. sempy_labs/_a_lib_info.py +1 -1
  5. sempy_labs/_external_data_shares.py +55 -1
  6. sempy_labs/_helper_functions.py +169 -5
  7. sempy_labs/_labels.py +126 -0
  8. sempy_labs/_list_functions.py +1 -1
  9. sempy_labs/_notebooks.py +152 -3
  10. sempy_labs/directlake/_dl_helper.py +4 -1
  11. sempy_labs/graph/_users.py +3 -5
  12. sempy_labs/lakehouse/_helper.py +18 -9
  13. sempy_labs/lakehouse/_lakehouse.py +18 -9
  14. sempy_labs/migration/_migrate_calctables_to_lakehouse.py +38 -47
  15. sempy_labs/migration/_migrate_calctables_to_semantic_model.py +12 -22
  16. sempy_labs/migration/_migrate_model_objects_to_semantic_model.py +7 -11
  17. sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py +14 -23
  18. sempy_labs/ml_model/__init__.py +23 -0
  19. sempy_labs/ml_model/_functions.py +427 -0
  20. sempy_labs/report/_reportwrapper.py +1 -1
  21. sempy_labs/tom/_model.py +8 -3
  22. sempy_labs/variable_library/__init__.py +19 -0
  23. sempy_labs/variable_library/_functions.py +403 -0
  24. sempy_labs/_dax_query_view.py +0 -57
  25. sempy_labs/_ml_models.py +0 -111
  26. sempy_labs/_variable_libraries.py +0 -92
  27. {semantic_link_labs-0.11.2.dist-info → semantic_link_labs-0.11.3.dist-info}/WHEEL +0 -0
  28. {semantic_link_labs-0.11.2.dist-info → semantic_link_labs-0.11.3.dist-info}/licenses/LICENSE +0 -0
  29. {semantic_link_labs-0.11.2.dist-info → semantic_link_labs-0.11.3.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semantic-link-labs
3
- Version: 0.11.2
3
+ Version: 0.11.3
4
4
  Summary: Semantic Link Labs for Microsoft Fabric
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -17,7 +17,6 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: semantic-link-sempy>=0.11.1
19
19
  Requires-Dist: anytree
20
- Requires-Dist: powerbiclient
21
20
  Requires-Dist: polib
22
21
  Requires-Dist: jsonpath_ng
23
22
  Provides-Extra: test
@@ -27,7 +26,7 @@ Dynamic: license-file
27
26
  # Semantic Link Labs
28
27
 
29
28
  [![PyPI version](https://badge.fury.io/py/semantic-link-labs.svg)](https://badge.fury.io/py/semantic-link-labs)
30
- [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.11.2&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
29
+ [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.11.3&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
31
30
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
32
31
  [![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)
33
32
 
@@ -129,7 +128,7 @@ for file_name, file_url in notebook_files.items():
129
128
  import sempy_labs as labs
130
129
  import sempy_labs.lakehouse as lake
131
130
  import sempy_labs.report as rep
132
- from sempy_labs import migration, directlake, admin, graph, theme, mirrored_azure_databricks_catalog
131
+ from sempy_labs import migration, directlake, admin, graph, theme, mirrored_azure_databricks_catalog, ml_model, variable_library
133
132
  from sempy_labs.tom import connect_semantic_model
134
133
  from sempy_labs.report import connect_report
135
134
  ```
@@ -155,6 +154,7 @@ An even better way to ensure the semantic-link-labs library is available in your
155
154
  2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
156
155
 
157
156
  ## Version History
157
+ * [0.11.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.3) (August 6, 2025)
158
158
  * [0.11.2](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.2) (July 8, 2025)
159
159
  * [0.11.1](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.1) (June 24, 2025)
160
160
  * [0.11.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.0) (June 23, 2025)
@@ -1,6 +1,6 @@
1
- semantic_link_labs-0.11.2.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
2
- sempy_labs/__init__.py,sha256=aCuU2GdiTwHDJ-nbVnwqyiXoy24Xq2DK3xISAVO8ocQ,16099
3
- sempy_labs/_a_lib_info.py,sha256=2Xt8KLFSacklZ-yFuWuo_2v50KERcLNCLbcJ2PWJSmg,53
1
+ semantic_link_labs-0.11.3.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
2
+ sempy_labs/__init__.py,sha256=1XV5tHtRTI45Jwmn4YDI2PTwc36c46bdtCZl1oEwymw,15940
3
+ sempy_labs/_a_lib_info.py,sha256=JoUvoiyW1DCzOuvpwzUxE9orjhsXBfeQMKvbWDpcdgM,53
4
4
  sempy_labs/_ai.py,sha256=fiI3RCadJ2jG15vZIWD9rKVhvmGWoD9uth9-PlSPBNs,16196
5
5
  sempy_labs/_authentication.py,sha256=GjtN5XqIyWXbR5Ni4hfYiUNwgFa-ySX8e-BrqE1vgGc,6903
6
6
  sempy_labs/_capacities.py,sha256=KSm7OKkv8AvkGeH1e_U22hit7LRTCdWf00MdtY9J6f8,40416
@@ -11,7 +11,6 @@ sempy_labs/_dashboards.py,sha256=_4_3c22F2u652NwxhQ3eJayVkslYu4-RWMwIIp0DRYs,194
11
11
  sempy_labs/_data_pipelines.py,sha256=ZskrozWywbb-KHuf7Ku3DR1X_LVfgvkKPr_SiLF6KL8,4861
12
12
  sempy_labs/_dataflows.py,sha256=cJtvWFMj3hFKdIVHOK-EREo3DjQGDI9mWZ3fX1ChlyA,20368
13
13
  sempy_labs/_dax.py,sha256=Nlm88FpXMJapBcyUQBBwLxBdRzEHGqI3xMZnSqWAEb4,17189
14
- sempy_labs/_dax_query_view.py,sha256=dFHFKCwDswVn57Ai6N8T1webBXiH0X4_oBzZi0jx3Q0,1882
15
14
  sempy_labs/_daxformatter.py,sha256=A2jTg9kSAye_LuIsCYmaYq5EbInAMfbDylHrERGB3Cs,3037
16
15
  sempy_labs/_delta_analyzer.py,sha256=TxfSxdOw7PYLWIBPkdvsIDJO61nNtcpYmtvtrr83sDA,17241
17
16
  sempy_labs/_delta_analyzer_history.py,sha256=wwA9UNzFVsIpsUUy9zD50AaarA-wBY_hnpC3-Db4VTU,10883
@@ -21,30 +20,30 @@ sempy_labs/_documentation.py,sha256=_TzhSYzGBVZYPaHm34T8dtTCbc_t4Mx45EzQKwD048g,
21
20
  sempy_labs/_environments.py,sha256=35-uxuKL2NqOgBRJ_l5_Eat_lNZJSR8fqryliiH7-G0,5974
22
21
  sempy_labs/_eventhouses.py,sha256=8jhTKNX6BFJEkeupvwA9RhH9KdQij3-kdBMCS1Bp64M,5397
23
22
  sempy_labs/_eventstreams.py,sha256=XaGlWzWKJVPhrQ1xUNsuPyJOQFJyrcvJTXbEtQddGfk,3546
24
- sempy_labs/_external_data_shares.py,sha256=WQ8_B7K86rH5HzPymwmoQDva3Y6Cv5vvJOhirb1I8dY,6557
23
+ sempy_labs/_external_data_shares.py,sha256=xoP9zKpIBIe_m2TYawuwRFIji-DVBMn9pbmjUTuo2Sc,8935
25
24
  sempy_labs/_gateways.py,sha256=j0xgOukiv-_ARF413-38lGy4mD8t9DTPAcrLpBk340I,17814
26
25
  sempy_labs/_generate_semantic_model.py,sha256=brw0nahfWLPGxk2G7osVGeSzMObdI2UoHJreQmlx0Bc,18399
27
26
  sempy_labs/_git.py,sha256=3ip_tWHrJgnr0o_odfG5tlnIKeHJF4F1iLgS3fCyj6w,17893
28
27
  sempy_labs/_graphQL.py,sha256=rkYvNXYgg94EZbIHyOY4Z1lOOSQP8g7sdubA11RngeI,2739
29
- sempy_labs/_helper_functions.py,sha256=MqRA6ZvZi8MJRw7MUvz2XMTfRu07x7_510wKkfrYBjw,74821
28
+ sempy_labs/_helper_functions.py,sha256=oR8FiOnwIvzB6IsX1EdLd_e5I6FqZAcI6E0OAb_Digo,80937
30
29
  sempy_labs/_icons.py,sha256=SB9EQeoFCfD4bO6fcYuJOoPRSYenSrW0rI9G5RFsH28,3579
31
30
  sempy_labs/_job_scheduler.py,sha256=uUsxxPujJQdoHDB122DxCkEuHmQAlkYG7-LPM1pm0vY,17198
32
31
  sempy_labs/_kql_databases.py,sha256=UDUSM7NELKPUcbL43YhOW6D9cQVg2Ko9TT-_DBvyZDE,4786
33
32
  sempy_labs/_kql_querysets.py,sha256=FmtWRxtuw65Pu5h1qE3S-JqvWEQfCSUsQvH2VOIt8P0,3556
34
33
  sempy_labs/_kusto.py,sha256=p8zIlpdDoUWrLeq0fpoqreEsXKD3c0fklz1G3dnJRnU,4524
35
- sempy_labs/_list_functions.py,sha256=x5udRJdrfNKR40U5hxDUkPxti25qe4HPgf_03qQ4Pr0,59748
34
+ sempy_labs/_labels.py,sha256=UfGUSicESu5uhBzRsrIRiKtZoVH3lPo_rlbYClKP8X0,3770
35
+ sempy_labs/_list_functions.py,sha256=Dm8sZjXnbUOF-zQanCTGimVdATo2GWttXNJSyen9sCk,59814
36
36
  sempy_labs/_managed_private_endpoints.py,sha256=1IVbrvo51qRaTAHyl7NwBX0kDEWD4hygF78oA6KGs8k,7058
37
37
  sempy_labs/_mirrored_databases.py,sha256=dpn2NWQI9FcJNPLxOOuOHTpGco4mTiHiDPz69D6ANK0,13269
38
38
  sempy_labs/_mirrored_warehouses.py,sha256=uW0s-pUA0btvSsFfBkAjv2pbCQJKBkTGq2czMJrMN8g,1783
39
39
  sempy_labs/_ml_experiments.py,sha256=KXjqJ3hBXw6vvMLNHvhH2Y44Co2CapNsTbP9A6TExGE,3429
40
- sempy_labs/_ml_models.py,sha256=ilDWzCx0om-mTU-GoW4SrJqHA7y62cn057QnSSBc5z8,3315
41
40
  sempy_labs/_model_auto_build.py,sha256=LpeRDY-L3b8LxvxmbUXZGDfzlqcs84rAPePf9XgJ0yE,5075
42
41
  sempy_labs/_model_bpa.py,sha256=BTet6zRYehlDLYlt-wvfT-2J_cvhNZen5IKIsM5bcJo,21982
43
42
  sempy_labs/_model_bpa_bulk.py,sha256=N13FsCqDu3PrY1Jd7GnBM5mesoEwAohB0vhXnePIKZ4,15815
44
43
  sempy_labs/_model_bpa_rules.py,sha256=SZKUHEsWzvivpNQK28zkmaJ1Z16o6_XdQPcpwxznPTg,46299
45
44
  sempy_labs/_model_dependencies.py,sha256=MYig8VyWZRVn36teWcNrKFNfMnwIIB-W2drVKYaiHAg,13152
46
45
  sempy_labs/_mounted_data_factories.py,sha256=8-Rzvjv7DO3W0VkiL1__cRCgO3bk62Ui1QH34QNd7i0,3912
47
- sempy_labs/_notebooks.py,sha256=vyRlOn60rp4YdH_yT5svd8fENForj3xVmgN1lyG0x8A,9106
46
+ sempy_labs/_notebooks.py,sha256=M-GDK802I_RgmRyHfmxssXJHfpOgyXmPt2oNU0k6wmE,14389
48
47
  sempy_labs/_one_lake_integration.py,sha256=aThg8Fcei9qTFUTzg2Qwsn-3deTk0ICTCXx53Y23oso,6293
49
48
  sempy_labs/_query_scale_out.py,sha256=1VDwf-W47RXXxxf45FTzH7bjZvY8XPbMj-ONtd2j2MQ,15342
50
49
  sempy_labs/_refresh_semantic_model.py,sha256=PiWPRlWqkXCBiaNLBbh2163zvMbXJzJClCTUMIIVkLM,17355
@@ -57,7 +56,6 @@ sempy_labs/_tags.py,sha256=0Rw9lzLD2zhl-gJFAoGL-8tDaPKjOnIs0UIP4gs2ng8,5712
57
56
  sempy_labs/_translations.py,sha256=incxaW8U3jDYO6rCgASlgtScRN1wGwh14nW2Rmanl48,16158
58
57
  sempy_labs/_user_delegation_key.py,sha256=Jw8I8KNWlcKHo-mWkGPdM2QY37nsgjzgp-yhPH2yz8U,1433
59
58
  sempy_labs/_utils.py,sha256=aKGnUiXSLLRQRXXv8TH_XhGcOtDsnrs0RHmQ6YZMn3o,1786
60
- sempy_labs/_variable_libraries.py,sha256=LoG7ROX7ioJY-RDPz3xU9mERCeJ7LSUGc7tJXdx7XPo,3018
61
59
  sempy_labs/_vertipaq.py,sha256=3Qg9sSBq_jxeoYv01T_V0m7bncJeCQi3-s5TZSuRODo,38506
62
60
  sempy_labs/_vpax.py,sha256=7kP0VExTpx5PKiqA0lHr3ud-TmXUk_Li1hXDyNKTlE8,15461
63
61
  sempy_labs/_warehouses.py,sha256=8irFySpXN0MDcEHnUQodIvQUfZLRmcKzcRHqbvZSUzs,7400
@@ -124,7 +122,7 @@ sempy_labs/admin/_workspaces.py,sha256=jOs2IwFWtCAoWJ4GMYLtAjAfaDlJ-i-urNUYGukpZ
124
122
  sempy_labs/directlake/__init__.py,sha256=xDH3Y4Hxdnp1s7Whdkn6DCrS_cExcJURxkvuz-qv_HI,1879
125
123
  sempy_labs/directlake/_directlake_schema_compare.py,sha256=8KJEdcHHP-6IuEoipDbIOQeqLUtpPt0x4ZXL54MPp0U,5047
126
124
  sempy_labs/directlake/_directlake_schema_sync.py,sha256=hL3QwP9SN46CBqT39lkeLnJ9lLNDl5kLQryzamHUufM,6601
127
- sempy_labs/directlake/_dl_helper.py,sha256=UdFzlQqt6De_TV6i36MMguddRk527_hU7p2fd7rf3uk,10349
125
+ sempy_labs/directlake/_dl_helper.py,sha256=3lsCrz85NocEFmN3Ma4oQ0rrEcWus2FmInKzqeKMkBs,10389
128
126
  sempy_labs/directlake/_generate_shared_expression.py,sha256=JgyDR-E-4eAvcGkAZ0zRjNtAw_ZULzHmABwwOy9FOq0,3591
129
127
  sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=9IxO4FuvScQig4aubpfhvu6AxASdrAP9hdW8YBKZ6xU,2292
130
128
  sempy_labs/directlake/_get_shared_expression.py,sha256=t5aZkyCci3Anxle6NQBhjbT_pEAJcIeNZW54GCQRlHA,1172
@@ -138,27 +136,29 @@ sempy_labs/dotnet_lib/dotnet.runtime.config.json,sha256=syhDFQv6cEmZnE1WtFjNe3Nw
138
136
  sempy_labs/graph/__init__.py,sha256=fIx2ks5EhOiZ-8orZ7jq7txfwmfhlJ-4BdLWowm4YmE,572
139
137
  sempy_labs/graph/_groups.py,sha256=YRFrsJbHGCraUBlqRaL2VEN4BoGGmS2PoLjHcA6D8ME,12935
140
138
  sempy_labs/graph/_teams.py,sha256=UH5ETsReD0pzmdgqQFkcX_95o1aUAv2lAajRJc0RIZY,3175
141
- sempy_labs/graph/_users.py,sha256=sWTnDdtJysc5uNzXq28PFIg6KAomCRnNpIvCcM9oJ2w,10012
139
+ sempy_labs/graph/_users.py,sha256=cVd-FrEIsQ43c1GG5eCiZ3-xIYciQKrPcfj2fn7x5nY,9929
142
140
  sempy_labs/lakehouse/__init__.py,sha256=Nvn2idufLanbNuNWVYQeXyrTbJo-aiLBiXcg2OR248g,1127
143
141
  sempy_labs/lakehouse/_blobs.py,sha256=peVPDCw97sB1x9a4KMKOqUB2Igu82-gb4CsvGdbubrU,8557
144
142
  sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=QVxejuu4WFGkG-c2i9B_H6dZsb1m_FRSTraS9GahnT4,3681
145
143
  sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=4p43Sa2mjJT4heUDp_EpF0vgZff5oNqCxjbat7IZxwk,11940
146
- sempy_labs/lakehouse/_helper.py,sha256=DYG-YOVSGKxzDXHK26iaTrXmd104to4dbW3s2-KEPJA,8298
147
- sempy_labs/lakehouse/_lakehouse.py,sha256=lDadrhiV8uY0y-eWewWrTqc9CTtfsOFwYDW01Y7TWf4,9910
144
+ sempy_labs/lakehouse/_helper.py,sha256=q-z6DTO3-Iy5hM9zXpZhXRD1OPp7JAzGhcyJ_VheDcM,8644
145
+ sempy_labs/lakehouse/_lakehouse.py,sha256=tJFeXG1U_GcEW1EVMQKIQpz6kqh_aatAGo208cDCE0Y,10262
148
146
  sempy_labs/lakehouse/_livy_sessions.py,sha256=XwEA0QkcFCbCGxSO6MJ5GZ-j9kjNIBiQhIkWG_Znm0E,6034
149
147
  sempy_labs/lakehouse/_shortcuts.py,sha256=6WVqr-QvPvXQiB572BkcN8q-nA4JLCEEBT_eQNCoS-Q,16676
150
148
  sempy_labs/migration/__init__.py,sha256=aA8r2g2mN_elPG8qptXlRiIcyQ9Z5hjKJo23fSNm1RY,1015
151
149
  sempy_labs/migration/_create_pqt_file.py,sha256=IztG7XKAg98zZiWW0oUMtO7WnuqvcmE96gOAwe3UiKg,9659
152
150
  sempy_labs/migration/_direct_lake_to_import.py,sha256=XBGQUTHp3uVgOcRk85aPtMlfdaXhrdh9AkaA0AglfSc,3987
153
- sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=bL9558ihRJKwhBBEzNz3H8mtcy__06lRcsErEsd1dNY,17747
154
- sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=PsIpckoeuW1-G_pvhmbi4Cm5nQdR6UBPPBLMqAed7Pw,6260
155
- sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=j5yJj9tllgooC-j6viVG7gOUI6iIj7BY0zO87ZmiapE,22932
156
- sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=LnI-tMCqogvooSjc7vQrAP7fR1mMrKmT9AYnht1KTWg,7133
151
+ sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=d_0IlH5eXWonOkzryZC2qS0Qt3Jw5uDJaCuQX_GUOeI,17742
152
+ sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=Q4x5SQj1VRUIMH6aZY-nOk0XfFJK1D7gu-2ZqGNx_Oo,5991
153
+ sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=W0fPbTCUmSwNO8MMajOHMspUhET9Xl-5wa6VxaaPvFw,22885
154
+ sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=InhuLmtRIHumNp-p5gXNqPYZAbX2KPeeUuH6Ml1cgJk,6865
157
155
  sempy_labs/migration/_migration_validation.py,sha256=5XLIgpzSb9ZMfYZfKHLC1gFX9gkENJdKXvCjh_qE6d4,2611
158
156
  sempy_labs/migration/_refresh_calc_tables.py,sha256=AVffeVKPsB1XYs-3SAu04eSt6Gg-QRX9THI9vCRJwKo,5425
159
157
  sempy_labs/mirrored_azure_databricks_catalog/__init__.py,sha256=c3eHgHWg-OB7HCrh_u2e1H0A_dyhGaGiT95N2u9NaVo,285
160
158
  sempy_labs/mirrored_azure_databricks_catalog/_discover.py,sha256=tWuLMlXEyQE0fGTWqTUsubHnxqv6E3zjCDNLeK24IGM,7058
161
159
  sempy_labs/mirrored_azure_databricks_catalog/_refresh_catalog_metadata.py,sha256=B9NqU-FCoBBosbRPr65TOQjyYcsGPtsfgdz9rYlEWrM,1634
160
+ sempy_labs/ml_model/__init__.py,sha256=2rHXo_C-70NO4t5_McN6lxGwN2M3IBB6VuQMTE0Vnk4,649
161
+ sempy_labs/ml_model/_functions.py,sha256=b_TzmVorVXdn8k0JD0SF3kXYu9fduizN6BKSq_5Ot7w,15282
162
162
  sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
163
163
  sempy_labs/report/__init__.py,sha256=bMX55Py9iJZqLYC1G-M1AgSwLfu4EHRhQGqym4K2Nzc,1264
164
164
  sempy_labs/report/_download_report.py,sha256=Q1ho8EJybAKV8BlqN4Hq2yznH8DtUtLbSYtGUvG-toY,2695
@@ -171,7 +171,7 @@ sempy_labs/report/_report_functions.py,sha256=QVxM77PosaQvGu9s_UAiBMcuvgTAenP8mk
171
171
  sempy_labs/report/_report_helper.py,sha256=L9wU0N0rvTUMglZHTxcowywrBDuZvZTv3DA4JrX84Os,7207
172
172
  sempy_labs/report/_report_list_functions.py,sha256=m_Wf1YeZmNtOfCwIILpKUuVR7V2CnwnfhDjz1DDTxOI,3945
173
173
  sempy_labs/report/_report_rebind.py,sha256=J6DkNX5JF2NdC1Az-f3fkEfRQJ1LmpAMhftoz9WHoEI,5081
174
- sempy_labs/report/_reportwrapper.py,sha256=UQg2vW39mpuwyKnghq18hIfEucPT--inN7otkPyuYtg,110488
174
+ sempy_labs/report/_reportwrapper.py,sha256=GI38yGY_mXlFhE-WD8-0oHlL6kmU-M_kBcPp1qozgt0,110493
175
175
  sempy_labs/report/_save_report.py,sha256=0P1WwIBtSgwrhnjWWvf9xf-e7ifka3DWVF0HM5zeXps,5998
176
176
  sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
177
177
  sempy_labs/report/_bpareporttemplate/StaticResources/SharedResources/BaseThemes/CY24SU06.json,sha256=4N6sT5nLlYBobGmZ1Xb68uOMVVCBEyheR535js_et28,13467
@@ -203,8 +203,10 @@ sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visua
203
203
  sempy_labs/theme/__init__.py,sha256=JN0z8w_Hc7VUIchRbpY-rjU6879msrFiSTRtMMlr_5g,185
204
204
  sempy_labs/theme/_org_themes.py,sha256=7W9AsDNQ3JaQBovg_EEev-NRD8VEvzpelBspS7vsUTM,3296
205
205
  sempy_labs/tom/__init__.py,sha256=ZwSpgYDP5VamZTnYP3a1cYHiaKdktOvlOBSOY1816zY,107
206
- sempy_labs/tom/_model.py,sha256=yP_SryTyGEyiwchswuLiGOUTbj38zXhuRIFfyxivaE4,222640
207
- semantic_link_labs-0.11.2.dist-info/METADATA,sha256=g7fzHTpzIrLT1PsCrjeyKsXuNKdxxm1OtY_od1pf4kg,27362
208
- semantic_link_labs-0.11.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
209
- semantic_link_labs-0.11.2.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
210
- semantic_link_labs-0.11.2.dist-info/RECORD,,
206
+ sempy_labs/tom/_model.py,sha256=vAHPuRr3BK0qzFAXMBpztvuvDjDI9yBfRhdBk1FlIW0,222768
207
+ sempy_labs/variable_library/__init__.py,sha256=qyTw5vNldnwYv-TotQSFupwznKIQfcws1UxGjf1RNNo,437
208
+ sempy_labs/variable_library/_functions.py,sha256=eoB3hUKFGdGMSBNDEsEF9bVoELZp5AnyDxp5BsLGeDc,13733
209
+ semantic_link_labs-0.11.3.dist-info/METADATA,sha256=sbLyEIHvlDZOQ0XWi_bdJ7fsEXCmQzz_swfe_OMafUg,27458
210
+ semantic_link_labs-0.11.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
211
+ semantic_link_labs-0.11.3.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
212
+ semantic_link_labs-0.11.3.dist-info/RECORD,,
sempy_labs/__init__.py CHANGED
@@ -1,11 +1,10 @@
1
+ from ._labels import (
2
+ list_item_labels,
3
+ )
1
4
  from ._sql_endpoints import (
2
5
  list_sql_endpoints,
3
6
  refresh_sql_endpoint_metadata,
4
7
  )
5
- from ._variable_libraries import (
6
- list_variable_libraries,
7
- delete_variable_library,
8
- )
9
8
  from ._kusto import (
10
9
  query_kusto,
11
10
  query_workspace_monitoring,
@@ -16,9 +15,6 @@ from ._vpax import (
16
15
  from ._delta_analyzer_history import (
17
16
  delta_analyzer_history,
18
17
  )
19
- from ._dax_query_view import (
20
- generate_dax_query_view_url,
21
- )
22
18
  from ._mounted_data_factories import (
23
19
  list_mounted_data_factories,
24
20
  get_mounted_data_factory_definition,
@@ -91,11 +87,7 @@ from ._external_data_shares import (
91
87
  list_external_data_shares_in_item,
92
88
  create_external_data_share,
93
89
  revoke_external_data_share,
94
- )
95
- from ._ml_models import (
96
- list_ml_models,
97
- create_ml_model,
98
- delete_ml_model,
90
+ delete_external_data_share,
99
91
  )
100
92
  from ._ml_experiments import (
101
93
  list_ml_experiments,
@@ -202,6 +194,8 @@ from ._notebooks import (
202
194
  import_notebook_from_web,
203
195
  update_notebook_definition,
204
196
  create_notebook,
197
+ search_notebooks,
198
+ list_notebooks,
205
199
  )
206
200
  from ._sql import (
207
201
  ConnectWarehouse,
@@ -288,6 +282,7 @@ from ._list_functions import (
288
282
  list_synonyms,
289
283
  )
290
284
  from ._helper_functions import (
285
+ copy_item,
291
286
  convert_to_friendly_case,
292
287
  resolve_environment_id,
293
288
  resolve_capacity_id,
@@ -486,9 +481,6 @@ __all__ = [
486
481
  "list_kql_querysets",
487
482
  "create_kql_queryset",
488
483
  "delete_kql_queryset",
489
- "list_ml_models",
490
- "create_ml_model",
491
- "delete_ml_model",
492
484
  "list_ml_experiments",
493
485
  "create_ml_experiment",
494
486
  "delete_ml_experiment",
@@ -498,6 +490,7 @@ __all__ = [
498
490
  "list_external_data_shares_in_item",
499
491
  "create_external_data_share",
500
492
  "revoke_external_data_share",
493
+ "delete_external_data_share",
501
494
  "migrate_fabric_trial_capacity",
502
495
  "create_resource_group",
503
496
  "list_workloads",
@@ -577,7 +570,6 @@ __all__ = [
577
570
  "list_mounted_data_factories",
578
571
  "get_mounted_data_factory_definition",
579
572
  "delete_mounted_data_factory",
580
- "generate_dax_query_view_url",
581
573
  "delete_semantic_model",
582
574
  "delete_workspace",
583
575
  "create_sql_database",
@@ -588,8 +580,6 @@ __all__ = [
588
580
  "query_workspace_monitoring",
589
581
  "list_environments",
590
582
  "list_tags",
591
- "list_variable_libraries",
592
- "delete_variable_library",
593
583
  "create_vpax",
594
584
  "update_semantic_model_refresh_schedule",
595
585
  "apply_tags",
@@ -599,4 +589,8 @@ __all__ = [
599
589
  "list_semantic_model_datasources",
600
590
  "upgrade_dataflow",
601
591
  "get_dataflow_definition",
592
+ "list_item_labels",
593
+ "copy_item",
594
+ "search_notebooks",
595
+ "list_notebooks",
602
596
  ]
sempy_labs/_a_lib_info.py CHANGED
@@ -1,2 +1,2 @@
1
1
  lib_name = "semanticlinklabs"
2
- lib_version = "0.11.2"
2
+ lib_version = "0.11.3"
@@ -7,6 +7,8 @@ from ._helper_functions import (
7
7
  _base_api,
8
8
  _create_dataframe,
9
9
  resolve_item_id,
10
+ resolve_item_name_and_id,
11
+ resolve_workspace_id,
10
12
  )
11
13
  from sempy._utils._log import log
12
14
 
@@ -24,6 +26,8 @@ def create_external_data_share(
24
26
 
25
27
  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>`_.
26
28
 
29
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
30
+
27
31
  Parameters
28
32
  ----------
29
33
  item_name : str
@@ -53,6 +57,7 @@ def create_external_data_share(
53
57
  method="post",
54
58
  status_codes=201,
55
59
  payload=payload,
60
+ client="fabric_sp",
56
61
  )
57
62
  print(
58
63
  f"{icons.green_dot} An external data share was created for the '{item_name}' {item_type} within the '{workspace_name}' workspace for the {paths} paths."
@@ -71,6 +76,8 @@ def revoke_external_data_share(
71
76
 
72
77
  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`_.
73
78
 
79
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
80
+
74
81
  Parameters
75
82
  ----------
76
83
  external_data_share_id : uuid.UUID
@@ -91,6 +98,7 @@ def revoke_external_data_share(
91
98
  _base_api(
92
99
  request=f"/v1/workspaces/{workspace_id}/items/{item_id}/externalDataShares/{external_data_share_id}/revoke",
93
100
  method="post",
101
+ client="fabric_sp",
94
102
  )
95
103
  print(
96
104
  f"{icons.green_dot} The '{external_data_share_id}' external data share for the '{item_name}' {item_type} within the '{workspace_name}' workspace has been revoked."
@@ -106,6 +114,8 @@ def list_external_data_shares_in_item(
106
114
 
107
115
  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`_.
108
116
 
117
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
118
+
109
119
  Parameters
110
120
  ----------
111
121
  item_name : str
@@ -123,7 +133,7 @@ def list_external_data_shares_in_item(
123
133
  A pandas dataframe showing a list of the external data shares that exist for the specified item.
124
134
  """
125
135
 
126
- (workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
136
+ workspace_id = resolve_workspace_id(workspace)
127
137
  item_id = resolve_item_id(item=item_name, type=item_type, workspace=workspace_id)
128
138
 
129
139
  columns = {
@@ -145,6 +155,7 @@ def list_external_data_shares_in_item(
145
155
  responses = _base_api(
146
156
  request=f"/v1/workspaces/{workspace_id}/items/{item_id}/externalDataShares",
147
157
  uses_pagination=True,
158
+ client="fabric_sp",
148
159
  )
149
160
 
150
161
  rows = []
@@ -174,3 +185,46 @@ def list_external_data_shares_in_item(
174
185
  df = pd.DataFrame(rows, columns=list(columns.keys()))
175
186
 
176
187
  return df
188
+
189
+
190
+ @log
191
+ def delete_external_data_share(
192
+ external_data_share_id: UUID,
193
+ item: str | UUID,
194
+ item_type: str,
195
+ workspace: Optional[str | UUID] = None,
196
+ ):
197
+ """
198
+ Deletes the specified external data share.
199
+
200
+ This is a wrapper function for the following API: `External Data Shares Provider - Delete External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares-provider/delete-external-data-share`_.
201
+
202
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
203
+
204
+ Parameters
205
+ ----------
206
+ external_data_share_id : uuid.UUID
207
+ The external data share ID.
208
+ item : str | uuid.UUID
209
+ The item name or ID.
210
+ item_type : str
211
+ The `item type <https://learn.microsoft.com/rest/api/fabric/core/items/list-items?tabs=HTTP#itemtype>`_.
212
+ workspace : str | uuid.UUID, default=None
213
+ The Fabric workspace name or ID.
214
+ Defaults to None which resolves to the workspace of the attached lakehouse
215
+ or if no lakehouse attached, resolves to the workspace of the notebook.
216
+ """
217
+
218
+ (workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
219
+ (item_name, item_id) = resolve_item_name_and_id(
220
+ item=item, type=item_type, workspace=workspace_id
221
+ )
222
+
223
+ _base_api(
224
+ request=f"/v1/workspaces/{workspace_id}/items/{item_id}/externalDataShares/{external_data_share_id}",
225
+ method="delete",
226
+ client="fabric_sp",
227
+ )
228
+ print(
229
+ f"{icons.green_dot} The '{external_data_share_id}' external data share for the '{item_name}' {item_type} within the '{workspace_name}' workspace has been revoked."
230
+ )
@@ -20,6 +20,7 @@ import sempy_labs._authentication as auth
20
20
  from jsonpath_ng.ext import parse
21
21
  from jsonpath_ng.jsonpath import Fields, Index
22
22
  from sempy._utils._log import log
23
+ from os import PathLike
23
24
 
24
25
 
25
26
  def _build_url(url: str, params: dict) -> str:
@@ -238,6 +239,18 @@ def delete_item(
238
239
  )
239
240
 
240
241
 
242
+ @log
243
+ def create_folder_if_not_exists(
244
+ folder: str | PathLike, workspace: Optional[str | UUID] = None
245
+ ) -> UUID:
246
+ try:
247
+ x = fabric.resolve_folder_id(folder=folder, workspace=workspace)
248
+ except:
249
+ x = fabric.create_folder(folder=folder, workspace=workspace)
250
+
251
+ return x
252
+
253
+
241
254
  @log
242
255
  def create_item(
243
256
  name: str,
@@ -245,6 +258,7 @@ def create_item(
245
258
  description: Optional[str] = None,
246
259
  definition: Optional[dict] = None,
247
260
  workspace: Optional[str | UUID] = None,
261
+ folder: Optional[str | PathLike] = None,
248
262
  ):
249
263
  """
250
264
  Creates an item in a Fabric workspace.
@@ -263,6 +277,9 @@ def create_item(
263
277
  The Fabric workspace name or ID.
264
278
  Defaults to None which resolves to the workspace of the attached lakehouse
265
279
  or if no lakehouse attached, resolves to the workspace of the notebook.
280
+ folder : str | os.PathLike, default=None
281
+ The folder within the workspace where the item will be created.
282
+ Defaults to None which places the item in the root of the workspace.
266
283
  """
267
284
  from sempy_labs._utils import item_types
268
285
 
@@ -277,6 +294,10 @@ def create_item(
277
294
  payload["description"] = description
278
295
  if definition:
279
296
  payload["definition"] = definition
297
+ if folder:
298
+ payload["folderId"] = create_folder_if_not_exists(
299
+ folder=folder, workspace=workspace_id
300
+ )
280
301
 
281
302
  _base_api(
282
303
  request=f"/v1/workspaces/{workspace_id}/{item_type_url}",
@@ -290,6 +311,146 @@ def create_item(
290
311
  )
291
312
 
292
313
 
314
+ @log
315
+ def copy_item(
316
+ item: str | UUID,
317
+ type: str,
318
+ target_name: Optional[str] = None,
319
+ source_workspace: Optional[str | UUID] = None,
320
+ target_workspace: Optional[str | UUID] = None,
321
+ overwrite: bool = False,
322
+ ):
323
+ """
324
+ Copies an item (with its definition) from one location to another location.
325
+
326
+ Parameters
327
+ ----------
328
+ item : str | uuid.UUID
329
+ The name or ID of the item to be copied.
330
+ type : str
331
+ The type of the item.
332
+ target_name: str, default=None
333
+ The name of the item in the target workspace. Defaults to the same name as the source item.
334
+ source_workspace : str | uuid.UUID, default=None
335
+ The workspace name or ID in which the item exists.
336
+ Defaults to None which resolves to the workspace of the attached lakehouse
337
+ or if no lakehouse attached, resolves to the workspace of the notebook.
338
+ target_workspace : str | uuid.UUID, default=None
339
+ The workspace name or ID to which the item will be copied.
340
+ Defaults to None which resolves to the workspace of the attached lakehouse
341
+ or if no lakehouse attached, resolves to the workspace of the notebook.
342
+ overwrite: bool, default=False
343
+ If True, overwrites the item in the target workspace if it already exists.
344
+ """
345
+
346
+ items = {
347
+ "CopyJob": "copyJobs",
348
+ "Dataflow": "dataflows",
349
+ "Eventhouse": "eventhouses",
350
+ "GraphQLApi": "GraphQLApis",
351
+ "Report": "reports",
352
+ "SemanticModel": "semanticModels",
353
+ # "Environment": "environments",
354
+ "KQLDatabase": "kqlDatabases",
355
+ "KQLDashboard": "kqlDashboards",
356
+ "KQLQueryset": "kqlQuerysets",
357
+ "DataPipeline": "dataPipelines",
358
+ "Notebook": "notebooks",
359
+ "SparkJobDefinition": "sparkJobDefinitions",
360
+ "Eventstream": "eventstreams",
361
+ "MirroredWarehouse": "mirroredWarehouses",
362
+ "MirroredDatabase": "mirroredDatabases",
363
+ "MountedDataFactory": "mountedDataFactories",
364
+ "VariableLibrary": "variableLibraries",
365
+ "ApacheAirFlowJob": "ApacheAirflowJobs",
366
+ "WarehouseSnapshot": "warehousesnapshots",
367
+ "DigitalTwinBuilder": "digitaltwinbuilders",
368
+ "DigitalTwinBuilderFlow": "DigitalTwinBuilderFlows",
369
+ "MirroredAzureDatabricksCatalog": "mirroredAzureDatabricksCatalogs",
370
+ }
371
+ if type not in items:
372
+ raise ValueError(
373
+ f"{icons.red_dot} The '{type}' item type does not have a definition and cannot be copied."
374
+ )
375
+ type_url = items.get(type)
376
+
377
+ (item_name, item_id) = resolve_item_name_and_id(
378
+ item=item, type=type, workspace=source_workspace
379
+ )
380
+ (source_workspace_name, source_workspace_id) = resolve_workspace_name_and_id(
381
+ source_workspace
382
+ )
383
+ (target_workspace_name, target_workspace_id) = resolve_workspace_name_and_id(
384
+ target_workspace
385
+ )
386
+
387
+ if target_name is None:
388
+ target_name = item_name
389
+
390
+ if source_workspace_id == target_workspace_id and target_name == item_name:
391
+ raise ValueError(
392
+ f"{icons.red_dot} The source and target workspaces are the same and the target name is the same as the source name. No action taken."
393
+ )
394
+
395
+ result = _base_api(
396
+ request=f"v1/workspaces/{source_workspace_id}/{type_url}/{item_id}",
397
+ client="fabric_sp",
398
+ )
399
+ description = result.json().get("description")
400
+
401
+ payload = _base_api(
402
+ request=f"v1/workspaces/{source_workspace_id}/{type_url}/{item_id}/getDefinition",
403
+ method="post",
404
+ client="fabric_sp",
405
+ status_codes=None,
406
+ lro_return_json=True,
407
+ )
408
+ payload["displayName"] = target_name
409
+ if description:
410
+ payload["description"] = description
411
+
412
+ # Check if item exists in target workspace
413
+ exists = False
414
+ try:
415
+ target_item_id = resolve_item_id(
416
+ item=target_name, type=type, workspace=target_workspace_id
417
+ )
418
+ exists = True
419
+ except Exception:
420
+ exists = False
421
+
422
+ if exists and not overwrite:
423
+ raise ValueError(
424
+ f"{icons.warning} The item '{target_name}' of type '{type}' already exists in the target workspace '{target_workspace_name}' and overwrite is set to False."
425
+ )
426
+ elif exists and overwrite:
427
+ # Update item definition
428
+ print(
429
+ f"{icons.in_progress} Updating existing item '{target_name}' of type '{type}' in the target workspace '{target_workspace_name}'..."
430
+ )
431
+ _base_api(
432
+ request=f"/v1/workspaces/{target_workspace_id}/{type_url}/{target_item_id}/updateDefinition",
433
+ method="post",
434
+ client="fabric_sp",
435
+ payload=payload,
436
+ lro_return_status_code=True,
437
+ status_codes=None,
438
+ )
439
+ print(
440
+ f"{icons.green_dot} The item '{target_name}' of type '{type}' has been successfully updated in the target workspace '{target_workspace_name}'."
441
+ )
442
+ else:
443
+ print(
444
+ f"{icons.in_progress} Creating new item '{target_name}' of type '{type}' in the target workspace '{target_workspace_name}'..."
445
+ )
446
+ create_item(
447
+ name=target_name,
448
+ type=type,
449
+ definition=payload["definition"],
450
+ workspace=target_workspace_id,
451
+ )
452
+
453
+
293
454
  @log
294
455
  def get_item_definition(
295
456
  item: str | UUID,
@@ -997,15 +1158,15 @@ def _decode_b64(file, format: Optional[str] = "utf-8"):
997
1158
 
998
1159
  @log
999
1160
  def is_default_semantic_model(
1000
- dataset: str, workspace: Optional[str | UUID] = None
1161
+ dataset: str | UUID, workspace: Optional[str | UUID] = None
1001
1162
  ) -> bool:
1002
1163
  """
1003
1164
  Identifies whether a semantic model is a default semantic model.
1004
1165
 
1005
1166
  Parameters
1006
1167
  ----------
1007
- dataset : str
1008
- The name of the semantic model.
1168
+ dataset : str | uuid.UUID
1169
+ The name or ID of the semantic model.
1009
1170
  workspace : str | uuid.UUID, default=None
1010
1171
  The Fabric workspace name or ID.
1011
1172
  Defaults to None which resolves to the workspace of the attached lakehouse
@@ -1017,7 +1178,10 @@ def is_default_semantic_model(
1017
1178
  A True/False value indicating whether the semantic model is a default semantic model.
1018
1179
  """
1019
1180
 
1020
- (workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
1181
+ workspace_id = resolve_workspace_id(workspace)
1182
+ (dataset_name, dataset_id) = resolve_item_name_and_id(
1183
+ item=dataset, type="SemanticModel", workspace=workspace_id
1184
+ )
1021
1185
 
1022
1186
  dfI = fabric.list_items(workspace=workspace_id)
1023
1187
  filtered_df = dfI.groupby("Display Name").filter(
@@ -1026,7 +1190,7 @@ def is_default_semantic_model(
1026
1190
  )
1027
1191
  default_semantic_models = filtered_df["Display Name"].unique().tolist()
1028
1192
 
1029
- return dataset in default_semantic_models
1193
+ return dataset_name in default_semantic_models
1030
1194
 
1031
1195
 
1032
1196
  @log