semantic-link-labs 0.9.2__py3-none-any.whl → 0.9.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 (54) hide show
  1. {semantic_link_labs-0.9.2.dist-info → semantic_link_labs-0.9.4.dist-info}/METADATA +10 -6
  2. {semantic_link_labs-0.9.2.dist-info → semantic_link_labs-0.9.4.dist-info}/RECORD +54 -44
  3. {semantic_link_labs-0.9.2.dist-info → semantic_link_labs-0.9.4.dist-info}/WHEEL +1 -1
  4. sempy_labs/__init__.py +27 -1
  5. sempy_labs/_ai.py +8 -5
  6. sempy_labs/_capacity_migration.py +3 -2
  7. sempy_labs/_connections.py +45 -9
  8. sempy_labs/_dax.py +17 -3
  9. sempy_labs/_delta_analyzer.py +308 -138
  10. sempy_labs/_eventhouses.py +70 -1
  11. sempy_labs/_gateways.py +56 -8
  12. sempy_labs/_generate_semantic_model.py +30 -9
  13. sempy_labs/_helper_functions.py +84 -9
  14. sempy_labs/_job_scheduler.py +226 -2
  15. sempy_labs/_list_functions.py +42 -19
  16. sempy_labs/_ml_experiments.py +1 -1
  17. sempy_labs/_model_bpa.py +17 -2
  18. sempy_labs/_model_bpa_rules.py +20 -8
  19. sempy_labs/_semantic_models.py +117 -0
  20. sempy_labs/_sql.py +73 -6
  21. sempy_labs/_sqldatabase.py +227 -0
  22. sempy_labs/_translations.py +2 -2
  23. sempy_labs/_vertipaq.py +3 -3
  24. sempy_labs/_warehouses.py +1 -1
  25. sempy_labs/admin/__init__.py +49 -8
  26. sempy_labs/admin/_activities.py +166 -0
  27. sempy_labs/admin/_apps.py +143 -0
  28. sempy_labs/admin/_basic_functions.py +32 -652
  29. sempy_labs/admin/_capacities.py +250 -0
  30. sempy_labs/admin/_datasets.py +184 -0
  31. sempy_labs/admin/_domains.py +1 -3
  32. sempy_labs/admin/_items.py +3 -1
  33. sempy_labs/admin/_reports.py +165 -0
  34. sempy_labs/admin/_scanner.py +53 -49
  35. sempy_labs/admin/_shared.py +74 -0
  36. sempy_labs/admin/_tenant.py +489 -0
  37. sempy_labs/directlake/_dl_helper.py +0 -1
  38. sempy_labs/directlake/_update_directlake_partition_entity.py +6 -0
  39. sempy_labs/graph/_teams.py +1 -1
  40. sempy_labs/graph/_users.py +9 -1
  41. sempy_labs/lakehouse/_get_lakehouse_columns.py +2 -2
  42. sempy_labs/lakehouse/_get_lakehouse_tables.py +2 -2
  43. sempy_labs/lakehouse/_lakehouse.py +3 -3
  44. sempy_labs/lakehouse/_shortcuts.py +29 -16
  45. sempy_labs/migration/_migrate_calctables_to_lakehouse.py +2 -2
  46. sempy_labs/migration/_refresh_calc_tables.py +2 -2
  47. sempy_labs/report/__init__.py +3 -1
  48. sempy_labs/report/_download_report.py +4 -1
  49. sempy_labs/report/_export_report.py +272 -0
  50. sempy_labs/report/_report_functions.py +11 -263
  51. sempy_labs/report/_report_rebind.py +1 -1
  52. sempy_labs/tom/_model.py +281 -29
  53. {semantic_link_labs-0.9.2.dist-info → semantic_link_labs-0.9.4.dist-info}/LICENSE +0 -0
  54. {semantic_link_labs-0.9.2.dist-info → semantic_link_labs-0.9.4.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: semantic-link-labs
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: Semantic Link Labs for Microsoft Fabric
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -26,7 +26,7 @@ Requires-Dist: pytest>=8.2.1; extra == "test"
26
26
  # Semantic Link Labs
27
27
 
28
28
  [![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.9.2&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
29
+ [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.9.4&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
30
30
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
31
31
  [![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)
32
32
 
@@ -66,6 +66,7 @@ Check out the video below for an introduction to Semantic Link, Semantic Link La
66
66
  * [View unique columns touched in a single (or multiple) DAX query(ies)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.get_dax_query_dependencies)
67
67
  * [Analyze delta tables for Direct Lake semantic models using Delta Analyzer](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Delta%20Analyzer.ipynb)
68
68
  * [View synonyms from the linguistic schema](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.list_synonyms)
69
+ * [Add](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.tom.html#sempy_labs.tom.TOMWrapper.add_incremental_refresh_policy), [update](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.tom.html#sempy_labs.tom.TOMWrapper.update_incremental_refresh_policy) and [view](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.tom.html#sempy_labs.tom.TOMWrapper.show_incremental_refresh_policy) an incremental refresh policy.
69
70
  * Reports
70
71
  * [Report Best Practice Analyzer (BPA)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.report.html#sempy_labs.report.run_report_bpa)
71
72
  * [View report metadata](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Report%20Analysis.ipynb)
@@ -144,6 +145,8 @@ An even better way to ensure the semantic-link-labs library is available in your
144
145
  2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
145
146
 
146
147
  ## Version History
148
+ * [0.9.4](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.4) (February 27, 2025)
149
+ * [0.9.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.3) (February 13, 2025)
147
150
  * [0.9.2](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.2) (February 5, 2025)
148
151
  * [0.9.1](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.1) (January 22, 2025)
149
152
  * [0.9.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.0) (January 22, 2025)
@@ -283,10 +286,11 @@ python -m build
283
286
 
284
287
  #### Running and testing the .whl file
285
288
  1. Open a notebook in a Fabric workspace.
286
- 2. Navigate to 'Resources' within the Explorer tab.
287
- 3. Upload the .whl file here.
288
- 4. Drag the .whl file into a notebook cell.
289
- 5. Run the %pip install command generated by step 4.
289
+ 2. Navigate to 'Resources' within the Explorer tab on the left pane. Do not use the 'Files' section.
290
+ 3. Upload the .whl file to the 'Resource' section.
291
+ 4. Click on the '...' next to the .whl file and click 'Copy relative path'.
292
+ 5. Enter '%pip install ""' into a notebook cell. Within the double quotes, paste the copied path from step 4.
293
+ 6. Run the notebook cell.
290
294
 
291
295
  #### Submitting a Pull Request (PR)
292
296
  1. Within the 'Source Control' tab, commit your changes to the branch.
@@ -1,49 +1,51 @@
1
- sempy_labs/__init__.py,sha256=l2Vnhvr_zSC9xnCQjuLdHCA2tBOj2pRTht1GPwmOvbo,13933
2
- sempy_labs/_ai.py,sha256=CzsNw6Wpd2B5Rd0RcY250-_p0L-0gFoMNLEc_KmrobU,16177
1
+ sempy_labs/__init__.py,sha256=EFr1tNeIkUE-u4AORowm1C65EkNJKEx8pi_PYB-SPqw,14696
2
+ sempy_labs/_ai.py,sha256=rhVohfwrU1mvWH0EN_vCTnldb8xJNfGHZGba34k1JVw,16174
3
3
  sempy_labs/_authentication.py,sha256=GjtN5XqIyWXbR5Ni4hfYiUNwgFa-ySX8e-BrqE1vgGc,6903
4
4
  sempy_labs/_capacities.py,sha256=7rR4BL5XuWr5UO25jp8_5moymvX35AY_FG27H4HUcqQ,43949
5
- sempy_labs/_capacity_migration.py,sha256=wzOD14W7lCTx539GvkBSROMnTHEYNeFkz4L4C-0CXOQ,24762
5
+ sempy_labs/_capacity_migration.py,sha256=velat9KbauU11oF7GATlfMwycUxy2epSHmytrf0_Xcs,24734
6
6
  sempy_labs/_clear_cache.py,sha256=5z73I4Zdr3C0Bd4zyxrQdcGG2VOzsXWukzB_evm4bRs,12731
7
- sempy_labs/_connections.py,sha256=vPvyDUYsxNWX-sePyWVyP-pUD8MctB4vpKAjxL5KdJc,16953
7
+ sempy_labs/_connections.py,sha256=aLMneYcw9on-GXr6KIGmDIvo8cuMevbkmtlmB3uWXhU,18693
8
8
  sempy_labs/_data_pipelines.py,sha256=pL6hkYxHifZk6OCBt3MJm-eG2lK4iaYXs0FbbGGbXEc,5564
9
9
  sempy_labs/_dataflows.py,sha256=SZThUDRQcWujK30nNw1YI06y1L6-piNHLiPBb72s9Bk,8049
10
- sempy_labs/_dax.py,sha256=2FCN2SInk8E5LMNMO5fnrWhQ-gC9S-B4FG3bDYUk_Jk,16452
11
- sempy_labs/_delta_analyzer.py,sha256=W-tnic6gG_bCF4441Qjx7vSWbY4QzkhgZseUdIpwV_Q,10480
10
+ sempy_labs/_dax.py,sha256=cFaXJUHuG93lYmjq_4CLG6gStvSTtgvJ8NA43TqeW_g,16871
11
+ sempy_labs/_delta_analyzer.py,sha256=TFZFlrC4_AYdPv0St3E9Spxtm7qILRPfOLvxxxq6OcY,17403
12
12
  sempy_labs/_deployment_pipelines.py,sha256=SDQYkCAhOAlxBr58jYxtLFOVySiRXO0_WhfOKGDeYZQ,6254
13
13
  sempy_labs/_documentation.py,sha256=yVA8VPEzx_fmljtcvSxtB7-BeupYsfdMXXjp6Fpnyo8,5007
14
14
  sempy_labs/_environments.py,sha256=F0lbOqkBGFINIB49C9M_bv-F3A5OtwyYbCFKdCHkkQc,5433
15
- sempy_labs/_eventhouses.py,sha256=bxbcCIq0qH2_k5A1x7z-BDfzPMoE8f1sFm9SUIHJ9Go,3948
15
+ sempy_labs/_eventhouses.py,sha256=Cdvixgg2JUb1QO4FKdQKn-9QquhpJRcuG15HYLusv2k,6225
16
16
  sempy_labs/_eventstreams.py,sha256=TY0HBWRjizonKr3g8doKrffvOqlGY4l1VomcBnUUh-g,3996
17
17
  sempy_labs/_external_data_shares.py,sha256=MP0nx9uFzjiV04xpq09UAM8n_1ckPBae2uhI6Vk0ZoY,6537
18
- sempy_labs/_gateways.py,sha256=3_0zjMS1vaL00B3M-1jT2Yq-5fJY_DF9_gcHu8Wrw0k,15328
19
- sempy_labs/_generate_semantic_model.py,sha256=OtzWWJ1EeDCYfEKn5TKnAUfbXOvqNI3cNkoJow3KkmE,17865
18
+ sempy_labs/_gateways.py,sha256=tbSEOGCc-mnvAYTVwJeDv8nWZkokf_OUOGfh3z8ePbw,17495
19
+ sempy_labs/_generate_semantic_model.py,sha256=gHJoXEZ4X4-YPjmpARfOxpSG8BJwAOYl9dqNKMOyRAI,18559
20
20
  sempy_labs/_git.py,sha256=lB0mJMGecvS1scPTbMolk0Tg_0skdbaj0-9W_2cA1K0,15014
21
21
  sempy_labs/_graphQL.py,sha256=7zyXXzsA_l2NeumeSrg5J7JMAexHFzeKFr59XTJWfrk,2906
22
- sempy_labs/_helper_functions.py,sha256=AiXwnyebS7jFhjBubrKpiZRtUXN3hKMIkSxygk2hcI0,46792
22
+ sempy_labs/_helper_functions.py,sha256=KZT3WdzO_gcj3lQxCl3AJgSFtOLsP-0aaVdwVI0ZRgo,48650
23
23
  sempy_labs/_icons.py,sha256=ez2dx_LCti71S_-eB6WYQ-kOMyiBL8ZJN12-ev5dcmA,3579
24
- sempy_labs/_job_scheduler.py,sha256=kVuBiUhzaNJJ7d_HiP3CNhMe3lHa6u87MyYAWslgghA,7522
24
+ sempy_labs/_job_scheduler.py,sha256=_-Pifkttk1oPNxewxwWcQ4QC_Hr24GSi6nmrEXwc0pc,15814
25
25
  sempy_labs/_kql_databases.py,sha256=ed5w9k9iACsy7hMr0pBQB3ETKW3rucVZuRc-FVb_ihY,4524
26
26
  sempy_labs/_kql_querysets.py,sha256=7E9FpV_wlZ1F_S2GncAzRiHoryqDQFvZaRftde0_oKc,4036
27
- sempy_labs/_list_functions.py,sha256=OqbNTseY8rwfqdNm62jLO_Eb5oOf97-nkcMZxuHRB8g,66633
27
+ sempy_labs/_list_functions.py,sha256=lUGtYt6fH-D5ujizXc4MtvaXsviAEHaS9bsO26sJs7A,67114
28
28
  sempy_labs/_managed_private_endpoints.py,sha256=Po5ki9jQ5Wg3uxvHkAWuhtPHAkgOYspv19ZoAYzg9JM,6350
29
29
  sempy_labs/_mirrored_databases.py,sha256=OrxHlMjahW0Bx5GfTwAHGxDO5hy-9Pt5e9N5HKiRjLo,14028
30
30
  sempy_labs/_mirrored_warehouses.py,sha256=Q3WlRjUwCLz8KW1eN8MiTPeY0P52Vkuz5kgnv4GvQ3k,1739
31
- sempy_labs/_ml_experiments.py,sha256=cMJCgNMwpovvQgZt4vSQ7x4HM3f_P5ZSqA74uF86_KE,4054
31
+ sempy_labs/_ml_experiments.py,sha256=pTpc7vx5z7dvjaViB8DMbiIEN7thVO4cLhyUKP-RYpE,4057
32
32
  sempy_labs/_ml_models.py,sha256=BGnYC0-K1cb9VikCmqods5bxckzYplkJkDO3jwttpqI,3924
33
33
  sempy_labs/_model_auto_build.py,sha256=PTQo3dufzLSFcQ5shFkmBWAVSdP7cTJgpUclrcXyNbg,5105
34
- sempy_labs/_model_bpa.py,sha256=7NIKlF7Mhxm0RxLK42Pi3aLOiRmxFFb_20aPTHLM9W4,21413
34
+ sempy_labs/_model_bpa.py,sha256=wxQz2iEAk1oIlEsJOCPazQfkL_E9Zwf3QG0PYG1GPJ8,22060
35
35
  sempy_labs/_model_bpa_bulk.py,sha256=F_AzebdpMm7QvYuSuSj52NTg6jYE9H1FJJDpdnyNF-g,16039
36
- sempy_labs/_model_bpa_rules.py,sha256=rYDIsGcoynntcdNA1O3sLf-e6R6dspIBByhWrziV59Q,45555
36
+ sempy_labs/_model_bpa_rules.py,sha256=L3XaK1SThgz3h0uTZZH92IVkWooG5rhqVus-ddnBIHw,45975
37
37
  sempy_labs/_model_dependencies.py,sha256=0xGgubrq76zIvBdEqmEX_Pd6WdizXFVECBW6BPl2DZo,13162
38
38
  sempy_labs/_notebooks.py,sha256=Ev8E4kxJHAnpqUacBxmov227pZH54CwbCP-C6OpjWD0,8458
39
39
  sempy_labs/_one_lake_integration.py,sha256=3RYJ6det_oM3NcAqwrONATTggkNAXRZFvVbrOA1Pg94,6274
40
40
  sempy_labs/_query_scale_out.py,sha256=nra1q8s-PKpZTlI_L0lMGO1GmdBk6sqETsBQShF1yPY,15352
41
41
  sempy_labs/_refresh_semantic_model.py,sha256=4w_uaYLbaZptmEFY7QHWzOgXcgc2ctGx8HQvt2aguxk,17360
42
+ sempy_labs/_semantic_models.py,sha256=PeH80kas-a0bQY6fmsjVWVQXZHYq34qZHjAVP847mCo,3699
42
43
  sempy_labs/_spark.py,sha256=SuSTjjmtzj7suDgN8Njk_pNBaStDLgIJB_1yk_e2H1Y,19340
43
- sempy_labs/_sql.py,sha256=cXPjmb3OiOucdWi8QU73lPUiNnZ3LOeoBpoaRwjj1l4,5337
44
- sempy_labs/_translations.py,sha256=CxpfnyCmn6hAiImxTOvz6x1HG4ppZORHCemJogKPV-M,16193
45
- sempy_labs/_vertipaq.py,sha256=jpaRnqRT-Hks0d79SCVs3BKs3dMF63tom5TwMXs1Iig,38084
46
- sempy_labs/_warehouses.py,sha256=ym_AnJIekGLOEpeIK_iVtzfYehf-iyc1eW6JCW6ZhzU,7302
44
+ sempy_labs/_sql.py,sha256=WfSl-L_tlc6GpHk7pSrbk3nmvXM3HkuklnxF_89wkDQ,8009
45
+ sempy_labs/_sqldatabase.py,sha256=Jyp4bkinFfn7UaHjUtaT3FiT5IO7_uYcvOemk7bc5Ic,7829
46
+ sempy_labs/_translations.py,sha256=i4K2PFk6-TcmAnUpqz-z_GuDv9XEp1cBs0KY-x6ja1w,16168
47
+ sempy_labs/_vertipaq.py,sha256=xssYOQeVsEbptzWZAfhIuVb4n9WQKn64F329ONal1FI,38052
48
+ sempy_labs/_warehouses.py,sha256=EKUrgPXmQEvdZxY84CazKdbz6Sd8vqaV7sq7UF4odl0,7302
47
49
  sempy_labs/_workloads.py,sha256=uuTl-_7D_nubwCY5xrTfWF1apTpFbgRKwdY0oNFPDSk,4216
48
50
  sempy_labs/_workspace_identity.py,sha256=ZtaaYyFUmRabdxCYw9xoUNRwKvXi1YibryI9Ww9MzxU,2155
49
51
  sempy_labs/_workspaces.py,sha256=_4cwd5lg4JMEGuHaKyLHo7JQGJDb3v93eOO3Q8RYo44,11004
@@ -85,17 +87,24 @@ sempy_labs/_bpa_translation/_model/_translations_tr-TR.po,sha256=NdW-X4E0QmeLKM0
85
87
  sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=3NsFN8hoor_5L6738FjpJ8o4spwp8FNFGbVItHD-_ec,43500
86
88
  sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=ipMbnet7ZI5mZoC8KonYKVwGmFLHFB_9KIDOoBgSNfo,26815
87
89
  sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=5v6tVKGruqneAeMoa6F3tyg_JBL8qOpqOJofWpq2W3U,31518
88
- sempy_labs/admin/__init__.py,sha256=ZH4hnVyBpMZbgtcVeeagsJ7J0ihE7QES3WxIL4z78g4,1995
89
- sempy_labs/admin/_basic_functions.py,sha256=vrHszPvZdHF2UIYkpkYPDKKc1YfX5ZHlakYC6kDup4Q,39495
90
- sempy_labs/admin/_domains.py,sha256=Eo7QIkf4TixupC7cbiMlB2M-UVBbzH0-44bO8YIkxt8,15127
90
+ sempy_labs/admin/__init__.py,sha256=07JsO0ABl8DdHCdKFc00DcOJWSk5J3vP5JFwNpjjFSA,3194
91
+ sempy_labs/admin/_activities.py,sha256=YfISDzhXro9glEa_yJmoYv-2q2M1DIkoyNzgLl7eWuI,6695
92
+ sempy_labs/admin/_apps.py,sha256=aRoaFKdz6BPyiZpQ3YL_x1XaQ3UjHdnCLtZe8r8upUU,4078
93
+ sempy_labs/admin/_basic_functions.py,sha256=QKSUFCSHfyZJGREOoKg3QsquFFjxpRyHUpcuB9BNYvM,17168
94
+ sempy_labs/admin/_capacities.py,sha256=QhcS5i6NVra7w7bQK04VeyqUfaxNOl2lhpo5uvnuO1Y,7846
95
+ sempy_labs/admin/_datasets.py,sha256=kMerpBNro--kKdp2rhEKnVe0JDGjMDsxqgfbbw17K-U,6235
96
+ sempy_labs/admin/_domains.py,sha256=Z0EhIJCcujx1NumeqM4eKAvai18p-9TAw1WJaU-cbbE,15076
91
97
  sempy_labs/admin/_external_data_share.py,sha256=q4gw5iYZJDH-9xIM6L0b2CU9ebUIdE-ZVrFsulRHyUU,3364
92
98
  sempy_labs/admin/_git.py,sha256=gsbDQKd66knCI_Zh8vHSfHK-uQVJjVmhKKvfMMYKZyA,2264
93
- sempy_labs/admin/_items.py,sha256=8RT3CqFQiDCs-XEgAtQeD3YSFezOz3_E_MArTZAiV-o,8705
94
- sempy_labs/admin/_scanner.py,sha256=c8m4k3s_CHFg8qsMgv0jGUdwIjoIbVDT27z5cEkI_-E,4781
99
+ sempy_labs/admin/_items.py,sha256=zX-eUDyQWiB8mY8Nojj03-_R728JvVIOlp0iEOisnKE,8750
100
+ sempy_labs/admin/_reports.py,sha256=G9BIYNgiwHE3hJIL5F4-W6_iy4_yGT7CRmKR7E8OkLw,5289
101
+ sempy_labs/admin/_scanner.py,sha256=Nz4HPf-ibf-wl2I4_8gR88P6SwaourpjcCrpsjLfUK8,4434
102
+ sempy_labs/admin/_shared.py,sha256=STngxSHqvDRzvfHSOFcG3sTmgdlCiLFh0g5witRwg4I,2951
103
+ sempy_labs/admin/_tenant.py,sha256=6CrJ8LBz5epst5kmqxbhoc0AmaU5KHZCJ36Hj6mlaVY,19141
95
104
  sempy_labs/directlake/__init__.py,sha256=etaj-3wqe5t93mu74tGYjEOQ6gtHWUogidOygiVvlq8,2131
96
105
  sempy_labs/directlake/_directlake_schema_compare.py,sha256=In3Ac07GI6T3eLDvQK7Xt9bXwJLI7MgNAk83rOKsYKc,5040
97
106
  sempy_labs/directlake/_directlake_schema_sync.py,sha256=5nDyE-8ApeaUJO9aJLasop8G9bG9TjPamDQvgAlCUew,4671
98
- sempy_labs/directlake/_dl_helper.py,sha256=jNWyrEbR0eNSPqaDeraUcTv1rMMvj8gipzxnSvdJl1g,10687
107
+ sempy_labs/directlake/_dl_helper.py,sha256=rr510sIDv5FL5Ipz-YqZWjY6XomBNhhoFbzWZcUyJvE,10672
99
108
  sempy_labs/directlake/_generate_shared_expression.py,sha256=WkE2onOO6XiloMNFdwwavGlANgmDGFMv2NXpqorhDAc,3002
100
109
  sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=e0WFQm4-daJR4K1aHuVaubu7T26yTeBgfNEMOXk-EzM,2392
101
110
  sempy_labs/directlake/_get_shared_expression.py,sha256=qc85kXggkx_7Sz_rAAli_yPnLzrGZpgD8IfVbTfZhQM,1133
@@ -103,37 +112,38 @@ sempy_labs/directlake/_guardrails.py,sha256=YO8OycXDxmWrtH8nTz5a4AddfnpskM83rTPE
103
112
  sempy_labs/directlake/_list_directlake_model_calc_tables.py,sha256=EYT4ELmOZ3Uklzy6uMQMidc4WtBXm21NQqZu1Q5HTsg,2509
104
113
  sempy_labs/directlake/_show_unsupported_directlake_objects.py,sha256=nmrZrtDez7U8Ji76i9fxnnTx1zxMu2LCOZTMz4sFUEc,3504
105
114
  sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=DC8Ig8oJtPY5qdWytIy03iiqYiQxLoRmQ5hsu6I69Sw,6348
106
- sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=z6dSrzPzRTQOVByLcGigMyXOF9YAUjSEqeAyAeVGh5U,8335
115
+ sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=7TAskwbQxEAkaJi-HtTJKVsKliy0BXDvaKqHX7BDHXU,8581
107
116
  sempy_labs/directlake/_warm_cache.py,sha256=xc7gG_OJY1rJYg79ztgcLATpnXHNqFaw-6CU1HgdlXk,9258
108
117
  sempy_labs/graph/__init__.py,sha256=AZ_IpOL06VvXrYmgbcrvQlxCxdDksvwXKf7JAGohCNI,620
109
118
  sempy_labs/graph/_groups.py,sha256=2axQ__eHNgJfb0ITOjexysz2Tq4AQ7xSejH4zG-QCFc,12531
110
- sempy_labs/graph/_teams.py,sha256=IxYaYxD3L6RGf4XFiC6VCLH5tqNWGEijtulEG8RwdRM,3043
111
- sempy_labs/graph/_users.py,sha256=5leq_Htox_rfbGQvK4T7NvNasur-HuoFey26qrSHjYM,5652
119
+ sempy_labs/graph/_teams.py,sha256=KTkIHd9XShsAiv1RsmVQpL2XmUVt4p9QyJFMP5evDj4,3050
120
+ sempy_labs/graph/_users.py,sha256=o3bnpjln-K8JDAJQlcjpfgthAHPTT3CiAYzsx-3n6I4,5898
112
121
  sempy_labs/lakehouse/__init__.py,sha256=k4offCjolrw8cpe1mj5AmPq5JcwsxohBwqR37nNc_7E,757
113
- sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=_XgEF6BJHp6jxRTqb0jmDG1OkdkKpmriKSVPrAB6o3E,2706
114
- sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=SSMRfxgeTquYspEiiBcjwEJNOcWqAekShcHZ_-OiCHs,8565
115
- sempy_labs/lakehouse/_lakehouse.py,sha256=XEl23FxGDgeP9Yr5rlJ2W9tzfF75OLqJ2dBuAgcUGOQ,8770
116
- sempy_labs/lakehouse/_shortcuts.py,sha256=wJfld4rbmHgSfPzejmfE1GAABjV2zbupiyNxk1PoN4A,8812
122
+ sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=FWCyJhqqnZg837eK-S5st0xZpxbhxkcS8aTguazxjjY,2685
123
+ sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=OmgYLNiegc8HwJP7hEPo5JMWFPyDIPSoqewBxsDkucc,8544
124
+ sempy_labs/lakehouse/_lakehouse.py,sha256=sD1bQ2mEnSmRJLd1D1yMeXOZHRvq8ZlyAGxjLCwFi0s,8734
125
+ sempy_labs/lakehouse/_shortcuts.py,sha256=2La-gjbU3LvpILLuaGIC1MgD_Z7LtlQvkicaguH4kjE,9803
117
126
  sempy_labs/migration/__init__.py,sha256=142n01VAqlcx4E0mGGRtUfVOEwAXVdiHI_XprmUm7As,1175
118
127
  sempy_labs/migration/_create_pqt_file.py,sha256=eRK0Jz9ZeV_7jV3kNRze0bTAIqxsAZXLKMGE_loKOaY,9677
119
128
  sempy_labs/migration/_direct_lake_to_import.py,sha256=uMqvElwkCHMyraP9t2nGNgstRobiHPFo4AMuS60dXyU,2732
120
- sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=QzQ5X7lrLD3lzlXfMtXdlkciT46nVJyZ5DunuO8vvBA,18019
129
+ sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=XzOPphiUmDIgv1ruhMyhAOs80hOfXCTKCrBGRP3PKtE,17998
121
130
  sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=Qt4WfmllCtSl-xkWzWWL5sTzi3lQDaJp43lVEXQisVY,6303
122
131
  sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=RD0ttWcBratAzpPKjFF6jpEnZEd6M7m8OfEUFbkInbA,22950
123
132
  sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=HYi2vn7yYDsBCTAXFTi6UiB86kdSlhQKPdwAt1nTKEE,7169
124
133
  sempy_labs/migration/_migration_validation.py,sha256=pl5Yv4BwRHZfAL0p2soj_Gk8FL3UcwiqKbX23pJe1oQ,2788
125
- sempy_labs/migration/_refresh_calc_tables.py,sha256=lKkwVBN7eyDoMJd0cv4jkLyO6iGjsuh96RPv6_Iiwrc,5537
134
+ sempy_labs/migration/_refresh_calc_tables.py,sha256=W-lYdUZZcoYyLRIpMdpgaz03PEMM6Zf7E1vzT6MmMAE,5516
126
135
  sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
127
- sempy_labs/report/__init__.py,sha256=esE_i1lL2AdcwWs7cE8AKSXZy_7w_4jJJtFULFkDPcU,1244
128
- sempy_labs/report/_download_report.py,sha256=hX6BlIN1dCE6wiDpTZymGus9ZC4UnnI32OiUeMQ7PN0,2709
136
+ sempy_labs/report/__init__.py,sha256=wnmjUX3w521OYnQBV3h9EaJs1eFLkIxmjc59VQOC19I,1293
137
+ sempy_labs/report/_download_report.py,sha256=Hu2cVzXN_6yjHJKvS0KGy0uwbbJNxd0P-w6M8-XeZao,2767
138
+ sempy_labs/report/_export_report.py,sha256=XCMsZzTBMgvQOe3Ltdod7my7_izpmP-3AVH6W5CExPE,10976
129
139
  sempy_labs/report/_generate_report.py,sha256=Ir4xDldITvWWJebbY1Ljj5m04cKQ8oPTQta83LtALoc,14253
130
140
  sempy_labs/report/_paginated.py,sha256=rsElE0IQ9qxRDuEp6qNF1EcD5XEgfTc7WsWEQsalsuI,2156
131
141
  sempy_labs/report/_report_bpa.py,sha256=bMZlvFVKypRCC7uC0QmkqV9i4n5nMj3X-tI2N6OOxLc,13861
132
142
  sempy_labs/report/_report_bpa_rules.py,sha256=tPVGA0hmE6QMLlWtig7Va7Ksr2yXWl_Lndq--tWWd6w,4959
133
- sempy_labs/report/_report_functions.py,sha256=_na5023utr9RsWuqI5C1CQ1ScSKQDZc0zydnHvuc0jM,29909
143
+ sempy_labs/report/_report_functions.py,sha256=XojlMOuAYompdDk1bNaJx6KRK7MRsZ6vfLTiBXfjdXA,19680
134
144
  sempy_labs/report/_report_helper.py,sha256=NcdWgFuh1GjDwVPzy6QWwg3ecaJKoWzZdhbxT6hbbdA,10599
135
145
  sempy_labs/report/_report_list_functions.py,sha256=K9tMDQKhIZhelHvfMMW0lsxbVHekJ-5dAQveoD7PUDA,3980
136
- sempy_labs/report/_report_rebind.py,sha256=TyLXerciHD9MexBT9SMOpfx5a9wXgRx1jGDMPG9gfPs,4987
146
+ sempy_labs/report/_report_rebind.py,sha256=pOzg_XWbip8ledM79APsLxUjLJNS9aTDKK9dEx1F7Ds,4990
137
147
  sempy_labs/report/_reportwrapper.py,sha256=gwilmrE_QqWLQankc1rFlbp1_bexbdR5K5pGyx0N3Go,82945
138
148
  sempy_labs/report/_bpareporttemplate/.platform,sha256=kWRa6B_KwSYLsvVFDx372mQriQO8v7dJ_YzQV_cfD-Q,303
139
149
  sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
@@ -165,9 +175,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
165
175
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
166
176
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
167
177
  sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
168
- sempy_labs/tom/_model.py,sha256=NRRrrCdOwVgJW8ZHq2KqpEZ-zMS6ug6U6TNZZSXQhOo,178711
169
- semantic_link_labs-0.9.2.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
170
- semantic_link_labs-0.9.2.dist-info/METADATA,sha256=ugHqM-11M0HTwUT5F6m1rILorGHozw86igz7nH28yKU,24650
171
- semantic_link_labs-0.9.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
172
- semantic_link_labs-0.9.2.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
173
- semantic_link_labs-0.9.2.dist-info/RECORD,,
178
+ sempy_labs/tom/_model.py,sha256=D1xls7A905JYEcVBrTHCeo52jZMBqaCEt5wDHZJ4Go4,188123
179
+ semantic_link_labs-0.9.4.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
180
+ semantic_link_labs-0.9.4.dist-info/METADATA,sha256=QciA55Cqp1J8Xj7ngdCNCtqq7lRd9trI3RVGwUvorOI,25489
181
+ semantic_link_labs-0.9.4.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
182
+ semantic_link_labs-0.9.4.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
183
+ semantic_link_labs-0.9.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.8.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
sempy_labs/__init__.py CHANGED
@@ -1,3 +1,7 @@
1
+ from sempy_labs._semantic_models import (
2
+ get_semantic_model_refresh_schedule,
3
+ enable_semantic_model_scheduled_refresh,
4
+ )
1
5
  from sempy_labs._graphQL import (
2
6
  list_graphql_apis,
3
7
  create_graphql_api,
@@ -5,8 +9,14 @@ from sempy_labs._graphQL import (
5
9
  from sempy_labs._job_scheduler import (
6
10
  list_item_job_instances,
7
11
  list_item_schedules,
12
+ create_item_schedule_cron,
13
+ create_item_schedule_daily,
14
+ create_item_schedule_weekly,
15
+ )
16
+ from sempy_labs._delta_analyzer import (
17
+ delta_analyzer,
18
+ get_delta_table_history,
8
19
  )
9
- from sempy_labs._delta_analyzer import delta_analyzer
10
20
  from sempy_labs._gateways import (
11
21
  list_gateway_members,
12
22
  list_gateway_role_assigments,
@@ -75,6 +85,7 @@ from sempy_labs._eventhouses import (
75
85
  create_eventhouse,
76
86
  list_eventhouses,
77
87
  delete_eventhouse,
88
+ get_eventhouse_definition,
78
89
  )
79
90
  from sempy_labs._eventstreams import (
80
91
  list_eventstreams,
@@ -158,6 +169,11 @@ from sempy_labs._notebooks import (
158
169
  from sempy_labs._sql import (
159
170
  ConnectWarehouse,
160
171
  ConnectLakehouse,
172
+ ConnectSQLDatabase,
173
+ )
174
+ from sempy_labs._sqldatabase import (
175
+ get_sql_database_columns,
176
+ get_sql_database_tables,
161
177
  )
162
178
  from sempy_labs._workspace_identity import (
163
179
  provision_workspace_identity,
@@ -291,6 +307,7 @@ __all__ = [
291
307
  "resolve_warehouse_id",
292
308
  "ConnectWarehouse",
293
309
  "ConnectLakehouse",
310
+ "ConnectSQLDatabase",
294
311
  "update_semantic_model_from_bim",
295
312
  "list_connections",
296
313
  "get_semantic_model_size",
@@ -499,4 +516,13 @@ __all__ = [
499
516
  "delta_analyzer",
500
517
  # "dax_perf_test",
501
518
  # "dax_perf_test_bulk",
519
+ "get_semantic_model_refresh_schedule",
520
+ "get_eventhouse_definition",
521
+ "enable_semantic_model_scheduled_refresh",
522
+ "get_delta_table_history",
523
+ "get_sql_database_columns",
524
+ "get_sql_database_tables",
525
+ "create_item_schedule_cron",
526
+ "create_item_schedule_daily",
527
+ "create_item_schedule_weekly",
502
528
  ]
sempy_labs/_ai.py CHANGED
@@ -1,10 +1,13 @@
1
1
  import sempy
2
2
  import sempy.fabric as fabric
3
3
  import pandas as pd
4
- from pyspark.sql import SparkSession
5
4
  from typing import List, Optional, Union
6
5
  from IPython.display import display
7
6
  import sempy_labs._icons as icons
7
+ from sempy_labs._helper_functions import (
8
+ _read_delta_table,
9
+ _run_spark_sql_query,
10
+ )
8
11
 
9
12
 
10
13
  def optimize_semantic_model(dataset: str, workspace: Optional[str] = None):
@@ -186,13 +189,13 @@ def generate_aggs(
186
189
 
187
190
  query = query[:-1]
188
191
 
189
- spark = SparkSession.builder.getOrCreate()
190
192
  fromTablePath = create_abfss_path(
191
193
  lakehouse_id=lakehouse_id,
192
194
  lakehouse_workspace_id=lakehouse_workspace_id,
193
195
  delta_table_name=lakeTName,
194
196
  )
195
- df = spark.read.format("delta").load(fromTablePath)
197
+
198
+ df = _read_delta_table(fromTablePath)
196
199
  tempTableName = f"delta_table_{lakeTName}"
197
200
  df.createOrReplaceTempView(tempTableName)
198
201
  sqlQuery = f"{query} \n FROM {tempTableName} {groupBy}"
@@ -201,7 +204,7 @@ def generate_aggs(
201
204
  print(sqlQuery)
202
205
 
203
206
  # Save query to spark dataframe
204
- spark_df = spark.sql(sqlQuery)
207
+ spark_df = _run_spark_sql_query(sqlQuery)
205
208
  f"\nCreating/updating the '{aggLakeTName}' table in the lakehouse..."
206
209
  # Write spark dataframe to delta table
207
210
  aggFilePath = create_abfss_path(
@@ -419,7 +422,7 @@ def generate_aggs(
419
422
  # dfP = fabric.list_partitions(dataset = dataset, workspace = workspace)
420
423
  # isDirectLake = any(r['Mode'] == 'DirectLake' for i, r in dfP.iterrows())
421
424
 
422
- # spark = SparkSession.builder.getOrCreate()
425
+ # spark = _create_spark_session()
423
426
  # views = spark.sql(f"SHOW VIEWS IN {lakehouse}").collect()
424
427
  # for view in views:
425
428
  # viewName = view['viewName']
@@ -2,10 +2,11 @@ import sempy.fabric as fabric
2
2
  from typing import Optional, List
3
3
  from sempy._utils._log import log
4
4
  import sempy_labs._icons as icons
5
- from sempy.fabric.exceptions import FabricHTTPException
6
5
  from sempy_labs._workspaces import assign_workspace_to_capacity
7
- from sempy_labs.admin._basic_functions import (
6
+ from sempy_labs.admin import (
8
7
  assign_workspaces_to_capacity,
8
+ )
9
+ from sempy_labs.admin._capacities import (
9
10
  _list_capacities_meta,
10
11
  list_capacities,
11
12
  )
@@ -19,6 +19,8 @@ def delete_connection(connection: str | UUID):
19
19
 
20
20
  This is a wrapper function for the following API: `Connections - Delete Connection <https://learn.microsoft.com/rest/api/fabric/core/connections/delete-connection>`_.
21
21
 
22
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
23
+
22
24
  Parameters
23
25
  ----------
24
26
  connection : str | uuid.UUID
@@ -26,7 +28,9 @@ def delete_connection(connection: str | UUID):
26
28
  """
27
29
 
28
30
  connection_id = _resolve_connection_id(connection)
29
- _base_api(request=f"/v1/connections/{connection_id}", method="delete")
31
+ _base_api(
32
+ request=f"/v1/connections/{connection_id}", client="fabric_sp", method="delete"
33
+ )
30
34
  print(f"{icons.green_dot} The '{connection}' connection has been deleted.")
31
35
 
32
36
 
@@ -36,6 +40,8 @@ def delete_connection_role_assignment(connection: str | UUID, role_assignment_id
36
40
 
37
41
  This is a wrapper function for the following API: `Connections - Delete Connection Role Assignment <https://learn.microsoft.com/rest/api/fabric/core/connections/delete-connection-role-assignment>`_.
38
42
 
43
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
44
+
39
45
  Parameters
40
46
  ----------
41
47
  connection : str | uuid.UUID
@@ -47,6 +53,7 @@ def delete_connection_role_assignment(connection: str | UUID, role_assignment_id
47
53
  connection_id = _resolve_connection_id(connection)
48
54
  _base_api(
49
55
  request=f"/v1/connections/{connection_id}/roleAssignments/{role_assignment_id}",
56
+ client="fabric_sp",
50
57
  method="delete",
51
58
  )
52
59
 
@@ -77,6 +84,8 @@ def list_connection_role_assignments(connection: str | UUID) -> pd.DataFrame:
77
84
 
78
85
  This is a wrapper function for the following API: `Connections - List Connection Role Assignments <https://learn.microsoft.com/rest/api/fabric/core/connections/list-connection-role-assignments>`_.
79
86
 
87
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
88
+
80
89
  Parameters
81
90
  ----------
82
91
  connection : str | uuid.UUID
@@ -100,7 +109,9 @@ def list_connection_role_assignments(connection: str | UUID) -> pd.DataFrame:
100
109
  df = _create_dataframe(columns=columns)
101
110
 
102
111
  responses = _base_api(
103
- request=f"/v1/connections/{connection_id}/roleAssignments", uses_pagination=True
112
+ request=f"/v1/connections/{connection_id}/roleAssignments",
113
+ client="fabric_sp",
114
+ uses_pagination=True,
104
115
  )
105
116
 
106
117
  for r in responses:
@@ -121,6 +132,8 @@ def list_connections() -> pd.DataFrame:
121
132
  """
122
133
  Lists all available connections.
123
134
 
135
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
136
+
124
137
  Returns
125
138
  -------
126
139
  pandas.DataFrame
@@ -136,13 +149,15 @@ def list_connections() -> pd.DataFrame:
136
149
  "Connection Type": "string",
137
150
  "Privacy Level": "string",
138
151
  "Credential Type": "string",
139
- "Single Sign on Type": "string",
140
- "Connection Encyrption": "string",
152
+ "Single Sign On Type": "string",
153
+ "Connection Encryption": "string",
141
154
  "Skip Test Connection": "bool",
142
155
  }
143
156
  df = _create_dataframe(columns=columns)
144
157
 
145
- responses = _base_api(request="/v1/connections", uses_pagination=True)
158
+ responses = _base_api(
159
+ request="/v1/connections", client="fabric_sp", uses_pagination=True
160
+ )
146
161
 
147
162
  for r in responses:
148
163
  for i in r.get("value", []):
@@ -194,6 +209,8 @@ def list_item_connections(
194
209
 
195
210
  This is a wrapper function for the following API: `Items - List Item Connections <https://learn.microsoft.com/rest/api/fabric/core/items/list-item-connections>`_.
196
211
 
212
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
213
+
197
214
  Parameters
198
215
  ----------
199
216
  item_name : str
@@ -229,6 +246,7 @@ def list_item_connections(
229
246
 
230
247
  responses = _base_api(
231
248
  request=f"/v1/workspaces/{workspace_id}/items/{item_id}/connections",
249
+ client="fabric_sp",
232
250
  uses_pagination=True,
233
251
  )
234
252
 
@@ -267,7 +285,7 @@ def _list_supported_connection_types(
267
285
  df = _create_dataframe(columns=columns)
268
286
 
269
287
  url = url.rstrip("&")
270
- responses = _base_api(request=url, uses_pagination=True)
288
+ responses = _base_api(request=url, client="fabric_sp", uses_pagination=True)
271
289
 
272
290
  records = []
273
291
  for r in responses:
@@ -309,6 +327,8 @@ def create_cloud_connection(
309
327
 
310
328
  This is a wrapper function for the following API: `Connections - Create Connection <https://learn.microsoft.com/rest/api/fabric/core/connections/create-connection>`_.
311
329
 
330
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
331
+
312
332
  Parameters
313
333
  ----------
314
334
  name : str
@@ -362,7 +382,11 @@ def create_cloud_connection(
362
382
  }
363
383
 
364
384
  _base_api(
365
- request="/v1/connections", method="post", payload=payload, status_codes=201
385
+ request="/v1/connections",
386
+ client="fabric_sp",
387
+ method="post",
388
+ payload=payload,
389
+ status_codes=201,
366
390
  )
367
391
 
368
392
  print(f"{icons.green_dot} The '{name}' cloud connection has been created.")
@@ -383,6 +407,8 @@ def create_on_prem_connection(
383
407
 
384
408
  This is a wrapper function for the following API: `Connections - Create Connection <https://learn.microsoft.com/rest/api/fabric/core/connections/create-connection>`_.
385
409
 
410
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
411
+
386
412
  Parameters
387
413
  ----------
388
414
  name : str
@@ -440,7 +466,11 @@ def create_on_prem_connection(
440
466
  }
441
467
 
442
468
  _base_api(
443
- request="/v1/connections", method="post", payload=payload, status_codes=201
469
+ request="/v1/connections",
470
+ client="fabric_sp",
471
+ method="post",
472
+ payload=payload,
473
+ status_codes=201,
444
474
  )
445
475
 
446
476
  print(f"{icons.green_dot} The '{name}' on-prem connection has been created.")
@@ -462,6 +492,8 @@ def create_vnet_connection(
462
492
 
463
493
  This is a wrapper function for the following API: `Connections - Create Connection <https://learn.microsoft.com/rest/api/fabric/core/connections/create-connection>`_.
464
494
 
495
+ Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
496
+
465
497
  Parameters
466
498
  ----------
467
499
  name : str
@@ -520,7 +552,11 @@ def create_vnet_connection(
520
552
  }
521
553
 
522
554
  _base_api(
523
- request="/v1/connections", method="post", payload=payload, status_codes=201
555
+ request="/v1/connections",
556
+ client="fabric_sp",
557
+ method="post",
558
+ payload=payload,
559
+ status_codes=201,
524
560
  )
525
561
 
526
562
  print(
sempy_labs/_dax.py CHANGED
@@ -62,9 +62,23 @@ def evaluate_dax_impersonation(
62
62
  payload=payload,
63
63
  )
64
64
  data = response.json()["results"][0]["tables"]
65
- column_names = data[0]["rows"][0].keys()
66
- data_rows = [row.values() for item in data for row in item["rows"]]
67
- df = pd.DataFrame(data_rows, columns=column_names)
65
+
66
+ # Get all possible column names from all rows because null columns aren't returned
67
+ all_columns = set()
68
+ for item in data:
69
+ for row in item["rows"]:
70
+ all_columns.update(row.keys())
71
+
72
+ # Create rows with all columns, filling missing values with None
73
+ rows = []
74
+ for item in data:
75
+ for row in item["rows"]:
76
+ # Create a new row with all columns, defaulting to None
77
+ new_row = {col: row.get(col) for col in all_columns}
78
+ rows.append(new_row)
79
+
80
+ # Create DataFrame from the processed rows
81
+ df = pd.DataFrame(rows)
68
82
 
69
83
  return df
70
84