semantic-link-labs 0.7.4__py3-none-any.whl → 0.8.1__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.
- {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.1.dist-info}/METADATA +43 -7
- {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.1.dist-info}/RECORD +59 -40
- {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.1.dist-info}/WHEEL +1 -1
- sempy_labs/__init__.py +116 -58
- sempy_labs/_ai.py +0 -2
- sempy_labs/_capacities.py +39 -3
- sempy_labs/_capacity_migration.py +623 -0
- sempy_labs/_clear_cache.py +8 -8
- sempy_labs/_connections.py +15 -13
- sempy_labs/_data_pipelines.py +118 -0
- sempy_labs/_documentation.py +144 -0
- sempy_labs/_eventhouses.py +118 -0
- sempy_labs/_eventstreams.py +118 -0
- sempy_labs/_generate_semantic_model.py +3 -3
- sempy_labs/_git.py +23 -24
- sempy_labs/_helper_functions.py +140 -47
- sempy_labs/_icons.py +40 -0
- sempy_labs/_kql_databases.py +134 -0
- sempy_labs/_kql_querysets.py +124 -0
- sempy_labs/_list_functions.py +218 -421
- sempy_labs/_mirrored_warehouses.py +50 -0
- sempy_labs/_ml_experiments.py +122 -0
- sempy_labs/_ml_models.py +120 -0
- sempy_labs/_model_auto_build.py +0 -4
- sempy_labs/_model_bpa.py +10 -12
- sempy_labs/_model_bpa_bulk.py +8 -7
- sempy_labs/_model_dependencies.py +26 -18
- sempy_labs/_notebooks.py +5 -16
- sempy_labs/_query_scale_out.py +6 -5
- sempy_labs/_refresh_semantic_model.py +7 -19
- sempy_labs/_spark.py +40 -45
- sempy_labs/_sql.py +60 -15
- sempy_labs/_vertipaq.py +25 -25
- sempy_labs/_warehouses.py +132 -0
- sempy_labs/_workspaces.py +0 -3
- sempy_labs/admin/__init__.py +53 -0
- sempy_labs/admin/_basic_functions.py +888 -0
- sempy_labs/admin/_domains.py +411 -0
- sempy_labs/directlake/_directlake_schema_sync.py +1 -1
- sempy_labs/directlake/_dl_helper.py +32 -16
- sempy_labs/directlake/_generate_shared_expression.py +11 -14
- sempy_labs/directlake/_guardrails.py +7 -7
- sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py +14 -24
- sempy_labs/directlake/_update_directlake_partition_entity.py +1 -1
- sempy_labs/directlake/_warm_cache.py +1 -1
- sempy_labs/lakehouse/_get_lakehouse_tables.py +3 -3
- sempy_labs/lakehouse/_lakehouse.py +3 -2
- sempy_labs/migration/_migrate_calctables_to_lakehouse.py +5 -0
- sempy_labs/report/__init__.py +9 -6
- sempy_labs/report/_generate_report.py +1 -1
- sempy_labs/report/_report_bpa.py +369 -0
- sempy_labs/report/_report_bpa_rules.py +113 -0
- sempy_labs/report/_report_helper.py +254 -0
- sempy_labs/report/_report_list_functions.py +95 -0
- sempy_labs/report/_report_rebind.py +0 -4
- sempy_labs/report/_reportwrapper.py +2037 -0
- sempy_labs/tom/_model.py +333 -22
- {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.1.dist-info}/LICENSE +0 -0
- {semantic_link_labs-0.7.4.dist-info → semantic_link_labs-0.8.1.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.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: Semantic Link Labs for Microsoft Fabric
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License: MIT License
|
|
@@ -20,13 +20,15 @@ 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
|
|
24
|
+
Requires-Dist: deltalake
|
|
23
25
|
Provides-Extra: test
|
|
24
26
|
Requires-Dist: pytest >=8.2.1 ; extra == 'test'
|
|
25
27
|
|
|
26
28
|
# Semantic Link Labs
|
|
27
29
|
|
|
28
30
|
[](https://badge.fury.io/py/semantic-link-labs)
|
|
29
|
-
[](https://readthedocs.org/projects/semantic-link-labs/)
|
|
30
32
|
[](https://github.com/psf/black)
|
|
31
33
|
[](https://pepy.tech/project/semantic-link-labs)
|
|
32
34
|
|
|
@@ -34,9 +36,31 @@ Requires-Dist: pytest >=8.2.1 ; extra == 'test'
|
|
|
34
36
|
[Read the documentation on ReadTheDocs!](https://semantic-link-labs.readthedocs.io/en/stable/)
|
|
35
37
|
---
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
Semantic Link Labs is a Python library designed for use in [Microsoft Fabric notebooks](https://learn.microsoft.com/fabric/data-engineering/how-to-use-notebook). This library extends the capabilities of [Semantic Link](https://learn.microsoft.com/fabric/data-science/semantic-link-overview) offering additional functionalities to seamlessly integrate and work alongside it. The goal of Semantic Link Labs is to simplify technical processes, empowering people to focus on higher level activities and allowing tasks that are better suited for machines to be efficiently handled without human intervention.
|
|
40
|
+
|
|
41
|
+
## Featured Scenarios
|
|
42
|
+
* Semantic Models
|
|
43
|
+
* [Migrating an import/DirectQuery semantic model to Direct Lake](https://github.com/microsoft/semantic-link-labs?tab=readme-ov-file#direct-lake-migration)
|
|
44
|
+
* [Model Best Practice Analyzer (BPA)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.run_model_bpa)
|
|
45
|
+
* [Vertipaq Analyzer](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.vertipaq_analyzer)
|
|
46
|
+
* [Tabular Object Model](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Tabular%20Object%20Model.ipynb) [(TOM)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.tom.html)
|
|
47
|
+
* [Translate a semantic model's metadata](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.translate_semantic_model)
|
|
48
|
+
* [Check Direct Lake Guardrails](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.lakehouse.html#sempy_labs.lakehouse.get_lakehouse_tables)
|
|
49
|
+
* [Refresh](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Semantic%20Model%20Refresh.ipynb), [clear cache](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.clear_cache), [backup](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.backup_semantic_model), [restore](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.restore_semantic_model), [copy backup files](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.copy_semantic_model_backup_file), [move/deploy across workspaces](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.deploy_semantic_model)
|
|
50
|
+
* [Run DAX queries which impersonate a user](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.evaluate_dax_impersonation)
|
|
51
|
+
* Reports
|
|
52
|
+
* [Report Best Practice Analyzer (BPA)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.report.html#sempy_labs.report.run_report_bpa)
|
|
53
|
+
* [View report metadata](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Report%20Analysis.ipynb)
|
|
54
|
+
* [View semantic model objects most frequently used in Power BI reports](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.list_semantic_model_object_report_usage)
|
|
55
|
+
* [View broken reports](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.list_report_semantic_model_objects)
|
|
56
|
+
* [Rebind reports](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.report.html#sempy_labs.report.report_rebind)
|
|
57
|
+
* Capacities
|
|
58
|
+
* [Migrating a Power BI Premium capacity (P sku) to a Fabric capacity (F sku)](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Capacity%20Migration.ipynb)
|
|
59
|
+
* APIs
|
|
60
|
+
* Wrapper functions for [Power BI](https://learn.microsoft.com/rest/api/power-bi/), [Fabric](https://learn.microsoft.com/rest/api/fabric/articles/using-fabric-apis), and [Azure](https://learn.microsoft.com/rest/api/azure/?view=rest-power-bi-embedded-2021-01-01) APIs
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Check out the [helper notebooks](https://github.com/microsoft/semantic-link-labs/tree/main/notebooks) for getting started!
|
|
40
64
|
|
|
41
65
|
If you encounter any issues, please [raise a bug](https://github.com/microsoft/semantic-link-labs/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=).
|
|
42
66
|
|
|
@@ -50,11 +74,13 @@ If you have ideas for new features/functions, please [request a feature](https:/
|
|
|
50
74
|
## Once installed, run this code to import the library into your notebook
|
|
51
75
|
```python
|
|
52
76
|
import sempy_labs as labs
|
|
53
|
-
from sempy_labs import migration, directlake
|
|
77
|
+
from sempy_labs import migration, directlake, admin
|
|
54
78
|
from sempy_labs import lakehouse as lake
|
|
55
79
|
from sempy_labs import report as rep
|
|
56
80
|
from sempy_labs.tom import connect_semantic_model
|
|
81
|
+
from sempy_labs.report import ReportWrapper
|
|
57
82
|
from sempy_labs import ConnectWarehouse
|
|
83
|
+
from sempy_labs import ConnectLakehouse
|
|
58
84
|
```
|
|
59
85
|
|
|
60
86
|
## Load semantic-link-labs into a custom [Fabric environment](https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment)
|
|
@@ -78,6 +104,8 @@ An even better way to ensure the semantic-link-labs library is available in your
|
|
|
78
104
|
2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
|
|
79
105
|
|
|
80
106
|
## Version History
|
|
107
|
+
* [0.8.1](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.1) (October 2, 2024)
|
|
108
|
+
* [0.8.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.0) (September 25, 2024)
|
|
81
109
|
* [0.7.4](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.4) (September 16, 2024)
|
|
82
110
|
* [0.7.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.3) (September 11, 2024)
|
|
83
111
|
* [0.7.2](https://github.com/microsoft/semantic-link-labs/releases/tag/0.7.2) (August 30, 2024)
|
|
@@ -124,7 +152,7 @@ Check out my [blog post](https://www.elegantbi.com/post/direct-lake-migration) o
|
|
|
124
152
|
5. Back in the notebook, the next step will create your new Direct Lake semantic model with the name of your choice, taking all the relevant properties from the orignal semantic model and refreshing/framing your new semantic model.
|
|
125
153
|
|
|
126
154
|
> [!NOTE]
|
|
127
|
-
>
|
|
155
|
+
> Calculated tables are also migrated to Direct Lake (as data tables with their DAX expression stored as model annotations in the new semantic model). Additionally, Field Parameters are migrated as they were in the original semantic model (as a calculated table). [Auto date/time tables](https://learn.microsoft.com/power-bi/guidance/auto-date-time) are not migrated. Auto date/time must be disabled in Power BI Desktop and proper date table(s) must be created prior to migration.
|
|
128
156
|
|
|
129
157
|
6. Finally, you can easily rebind your all reports which use the import/DQ semantic model to the new Direct Lake semantic model in one click.
|
|
130
158
|
|
|
@@ -137,6 +165,14 @@ Check out my [blog post](https://www.elegantbi.com/post/direct-lake-migration) o
|
|
|
137
165
|
* Non-supported objects are not transferred (i.e. calculated columns, relationships using columns with unsupported data types etc.).
|
|
138
166
|
* Reports used by your original semantic model will be rebinded to your new semantic model.
|
|
139
167
|
|
|
168
|
+
### Limitations
|
|
169
|
+
* Calculated columns are not migrated.
|
|
170
|
+
* Auto date/time tables are not migrated.
|
|
171
|
+
* References to calculated columns in Field Parameters are removed.
|
|
172
|
+
* References to calculated columns in measure expressions or other DAX expressions will break.
|
|
173
|
+
* Calculated tables are migrated as possible. The success of this migration depends on the interdependencies and complexity of the calculated table. This part of the migration is a workaround as technically calculated tables are not supported in Direct Lake.
|
|
174
|
+
* See [here](https://learn.microsoft.com/fabric/get-started/direct-lake-overview#considerations-and-limitations) for the rest of the limitations of Direct Lake.
|
|
175
|
+
|
|
140
176
|
## Contributing
|
|
141
177
|
|
|
142
178
|
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
|
@@ -1,32 +1,43 @@
|
|
|
1
|
-
sempy_labs/__init__.py,sha256=
|
|
2
|
-
sempy_labs/_ai.py,sha256=
|
|
3
|
-
sempy_labs/_capacities.py,sha256=
|
|
4
|
-
sempy_labs/
|
|
5
|
-
sempy_labs/
|
|
1
|
+
sempy_labs/__init__.py,sha256=rX6aU2I1Y30fOXJs2xNTvep8Hni5s3J67TT9MCDLpcw,9957
|
|
2
|
+
sempy_labs/_ai.py,sha256=CzsNw6Wpd2B5Rd0RcY250-_p0L-0gFoMNLEc_KmrobU,16177
|
|
3
|
+
sempy_labs/_capacities.py,sha256=X39LHYde3rgwW8vTbNUMt2S9dekTfy6sqQGXg-MCybY,20132
|
|
4
|
+
sempy_labs/_capacity_migration.py,sha256=tVrIT4sSWKQg-6AqjrvGQPIBGHTcMtPqdymUnEJKVbs,23612
|
|
5
|
+
sempy_labs/_clear_cache.py,sha256=JgY4Nio7Zy9YHOPxQseiZ5lJLWEi5s3Qn5SLSvuyBwo,12490
|
|
6
|
+
sempy_labs/_connections.py,sha256=w1NeC9auc07ko2pY3m5vM_9-sgW_chw1OxPzDviVC5k,12179
|
|
7
|
+
sempy_labs/_data_pipelines.py,sha256=gSmlkBpse0bodNfcfmS45_LKLtiv98nIqxbH70nSo-I,3590
|
|
6
8
|
sempy_labs/_dataflows.py,sha256=ApGMklXMQZQssYa7egxlBtsYz5mcR3JS69ZgeORXVBM,4051
|
|
7
9
|
sempy_labs/_dax.py,sha256=dt1GgHceyM7f6phRBPxRKnmQy_KYKpcgFQHuOjGbpLo,2029
|
|
8
10
|
sempy_labs/_deployment_pipelines.py,sha256=-wjqQieR25BR-0r2QfTzg4QuFzOgcayZLnS-fNYIPPU,5347
|
|
11
|
+
sempy_labs/_documentation.py,sha256=yVA8VPEzx_fmljtcvSxtB7-BeupYsfdMXXjp6Fpnyo8,5007
|
|
9
12
|
sempy_labs/_environments.py,sha256=oyfEeOLX5XPevumj4Il5t1z2gmsR8xm6pg1wfGoutMc,4821
|
|
10
|
-
sempy_labs/
|
|
11
|
-
sempy_labs/
|
|
12
|
-
sempy_labs/
|
|
13
|
-
sempy_labs/
|
|
14
|
-
sempy_labs/
|
|
15
|
-
sempy_labs/
|
|
16
|
-
sempy_labs/
|
|
17
|
-
sempy_labs/
|
|
13
|
+
sempy_labs/_eventhouses.py,sha256=tVUYJkAcwoBZooXawJpCKzx2YypawKECrfKouRTkMJU,3537
|
|
14
|
+
sempy_labs/_eventstreams.py,sha256=NV0YAC6V3nBxJIVKWH7ceAtooZoH9rA4zv45xTcb-t0,3556
|
|
15
|
+
sempy_labs/_generate_semantic_model.py,sha256=mvM1DDWEkyfU8Ee4NT9Zu52qZyCnmq0971esIjp_LpQ,13253
|
|
16
|
+
sempy_labs/_git.py,sha256=vXWv6e45H0OGIyzBvB-anSJYrBFjA2MVUYIjaUPd54I,12731
|
|
17
|
+
sempy_labs/_helper_functions.py,sha256=4nuL8JWC19CPUeoGinHB9wMsARkaG9fZczY_G9aC_BM,32270
|
|
18
|
+
sempy_labs/_icons.py,sha256=pwei9IrwbNAxmxCNgX_8cACwjhvmM6cYYZcS3sLR9jc,2696
|
|
19
|
+
sempy_labs/_kql_databases.py,sha256=DE_5un0QO5ayYiqKiMDinis0ZysmIWWaEoYQ9ach_8o,4110
|
|
20
|
+
sempy_labs/_kql_querysets.py,sha256=kH8diN3DxuCINlKhAvzyXKXtj0uJ0uhcxrWI9j097vU,3646
|
|
21
|
+
sempy_labs/_list_functions.py,sha256=jBdLo_8gnNk1nQdTlGvRbC_PMdyctxGnLQXwkDFNMcE,55255
|
|
22
|
+
sempy_labs/_mirrored_warehouses.py,sha256=xcVnrNwi46snQiS5iFKcZe-GGoFLqva7qW4iOPUD7Y8,1577
|
|
23
|
+
sempy_labs/_ml_experiments.py,sha256=fTqFB0qn0T1k4vGmaghvKUolb5Kvg_qfTOYl3ABknt8,3676
|
|
24
|
+
sempy_labs/_ml_models.py,sha256=nAISwah2fQI0OOJfBAEuI7d4uKu4DUIHi4BqUye6FQE,3572
|
|
25
|
+
sempy_labs/_model_auto_build.py,sha256=-qDwmFx3KMuIaaUU8CzmCX7CF7ZUVWWu-_GH2UhAU_8,5045
|
|
26
|
+
sempy_labs/_model_bpa.py,sha256=uiTcuDu4RCWE3xkhOSwzH1Mv0WmeAbuaBmvR5gz6UHE,20326
|
|
27
|
+
sempy_labs/_model_bpa_bulk.py,sha256=5hJrCHfOL3xiHolF7UfrXtJHuqHoNw9rFX1Z4HuTNzQ,14923
|
|
18
28
|
sempy_labs/_model_bpa_rules.py,sha256=B8hg3_ktS5ql859nL3e9kdV8fNDBgMNO5j2hGrXp6po,44855
|
|
19
|
-
sempy_labs/_model_dependencies.py,sha256=
|
|
20
|
-
sempy_labs/_notebooks.py,sha256=
|
|
29
|
+
sempy_labs/_model_dependencies.py,sha256=rFPVDA6gLKxy2rDPtHHIvVJF9SmJz4xRe4n922bzWtA,13452
|
|
30
|
+
sempy_labs/_notebooks.py,sha256=K1ZZ9y-lOzDLeJ2UlCmJlN7kml5FRPmE0Bj5SvNDwq8,4339
|
|
21
31
|
sempy_labs/_one_lake_integration.py,sha256=eIuLxlw8eXfUH2avKhsyLmXZbTllSwGsz2j_HMAikpQ,6234
|
|
22
|
-
sempy_labs/_query_scale_out.py,sha256=
|
|
23
|
-
sempy_labs/_refresh_semantic_model.py,sha256=
|
|
24
|
-
sempy_labs/_spark.py,sha256=
|
|
25
|
-
sempy_labs/_sql.py,sha256=
|
|
32
|
+
sempy_labs/_query_scale_out.py,sha256=Wk6vxyI6x1xFV30UpEwvzlD0TnentpKOO-8mEVLc7zE,15253
|
|
33
|
+
sempy_labs/_refresh_semantic_model.py,sha256=Kb3sZf9ihBcbh2la6c7wuAhUvGnqrlNR2obAdNJNz98,6920
|
|
34
|
+
sempy_labs/_spark.py,sha256=_gkmitnGIf0Q_wKDHcnkmGSyE6GtPgsi2QnudLcBWKU,19477
|
|
35
|
+
sempy_labs/_sql.py,sha256=p0CvDD3fF0IQdoFI6308-DDUFQR9V_qWpXfQvyX3znw,5356
|
|
26
36
|
sempy_labs/_translations.py,sha256=ocRtdgymcPYOT3jiYcVv9ze5i2gDjgLcTJBEl66pKtg,19771
|
|
27
|
-
sempy_labs/_vertipaq.py,sha256=
|
|
37
|
+
sempy_labs/_vertipaq.py,sha256=xJgs1DMSsxCC8e4YvIs22Qb36bDpJGtdbbLoYiPlgrs,35717
|
|
38
|
+
sempy_labs/_warehouses.py,sha256=qIDteSE5dFm0rkzF3Ouryb467VKxrHywNSSvtf_TcXM,3920
|
|
28
39
|
sempy_labs/_workspace_identity.py,sha256=2uum6Ojv1x3Zzp8JEAQ2ER9J5yafb_v_TgZwY5vdBwA,2120
|
|
29
|
-
sempy_labs/_workspaces.py,sha256=
|
|
40
|
+
sempy_labs/_workspaces.py,sha256=KZfQ1hAKhfIsq52ZF-RBptueWUh6-P-OA8YDfmSQbpM,10080
|
|
30
41
|
sempy_labs/_bpa_translation/_model/_translations_am-ET.po,sha256=ve23guQ48HXXn2_yGicUtr_Orhi9nth_lna8-x93GjA,37928
|
|
31
42
|
sempy_labs/_bpa_translation/_model/_translations_ar-AE.po,sha256=YtJzrUXQesme9D-m9JUGw4q7RSYfyXF25FH7PwDWcFI,35787
|
|
32
43
|
sempy_labs/_bpa_translation/_model/_translations_bg-BG.po,sha256=bvX36ZCeHGYiiZjDTzGz1kSxR89u05ZwuGPoIl9olX8,42546
|
|
@@ -65,37 +76,45 @@ sempy_labs/_bpa_translation/_model/_translations_tr-TR.po,sha256=YfcgHAiP0RK2hit
|
|
|
65
76
|
sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=t7kpMB65cOKNIg8rD8KJPqi9uxmqgY3c66sM19ec-Kg,41959
|
|
66
77
|
sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=QhmS3HSnILLN-OgMUGmNFvGr4TEhoH1FKL0F1SgU2nk,26035
|
|
67
78
|
sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=0ZivJJa-ggc7PJqLAgDmi8OGGUGzEcleGPmlLL9YYb4,30495
|
|
79
|
+
sempy_labs/admin/__init__.py,sha256=whrBFHvjWav0ni_LOYJ4Q63WtiJEPOQ1etudl2wiWKA,1445
|
|
80
|
+
sempy_labs/admin/_basic_functions.py,sha256=2gFJ9XSU3Bm-IpBYk9vUDqnCCkWicRcNGjF6qP4ds6w,29229
|
|
81
|
+
sempy_labs/admin/_domains.py,sha256=ByDqLsm1eDPnTr93yuVsPnhEQLGerWWwWk4_rAlRD1M,11691
|
|
68
82
|
sempy_labs/directlake/__init__.py,sha256=ZlpQQDdA5-C10zSf9YICH0waMIFM-55aacsEzvpuHEM,2047
|
|
69
83
|
sempy_labs/directlake/_directlake_schema_compare.py,sha256=ocHFU6E6HSKgcNLywGM0dx0ie9AXYwk-E7o7EYcqiN4,4422
|
|
70
|
-
sempy_labs/directlake/_directlake_schema_sync.py,sha256=
|
|
71
|
-
sempy_labs/directlake/_dl_helper.py,sha256=
|
|
72
|
-
sempy_labs/directlake/_generate_shared_expression.py,sha256=
|
|
84
|
+
sempy_labs/directlake/_directlake_schema_sync.py,sha256=I2SohqatMPDY8WXinAYP5QrVZ2wIaE4xsP-fVbTyAHE,4319
|
|
85
|
+
sempy_labs/directlake/_dl_helper.py,sha256=K4IN37gA_aRaFjpUT6hN1ExBMOR04_be2RSOtHh7k0Y,9260
|
|
86
|
+
sempy_labs/directlake/_generate_shared_expression.py,sha256=ayMkgmlmFzDTYrqbXGm5C3w05YDkI4SYnyi1eaIo9Vs,3087
|
|
73
87
|
sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=sovI4ds2SEgkp4Fi465jtJ4seRvQxdYgcixRDvsUwNM,2321
|
|
74
88
|
sempy_labs/directlake/_get_shared_expression.py,sha256=Xl2_GYqRll95cN7JjwLlULbcRXM71Ij9JkrYAp7cNJM,1943
|
|
75
|
-
sempy_labs/directlake/_guardrails.py,sha256=
|
|
89
|
+
sempy_labs/directlake/_guardrails.py,sha256=20l2f2jeIJ2-z2H64Vi2n1e8cjMuideXSbBT9OYQ3kE,2500
|
|
76
90
|
sempy_labs/directlake/_list_directlake_model_calc_tables.py,sha256=_rpnbgsFAz2W16PpgIOB0Rj_Fs1ZKrDbz3DUaaR_bfU,2143
|
|
77
91
|
sempy_labs/directlake/_show_unsupported_directlake_objects.py,sha256=-8werbzIi_xknMkymIsq-JwNTAvt0W18xA4HagXhT8U,3332
|
|
78
|
-
sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=
|
|
79
|
-
sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=
|
|
80
|
-
sempy_labs/directlake/_warm_cache.py,sha256=
|
|
92
|
+
sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=LpxYPxF_rkLD2okyKejLIV-qA8UeJ9xRWyv32kNdR_c,2822
|
|
93
|
+
sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=DCPNZfhqVG_yXnQbrMuattGGo1tuXt54RdAaiN84MSQ,8570
|
|
94
|
+
sempy_labs/directlake/_warm_cache.py,sha256=X4R2_i4jFnFXYmwhDIxPb9h1CdPVLzFKHItsz0QpeRg,8248
|
|
81
95
|
sempy_labs/lakehouse/__init__.py,sha256=6LVQltQ3cjyiuxvjXTuNdJ163zSqi4h_tEZY4zsxuSw,647
|
|
82
96
|
sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=Bb_iCTlNwl0wdN4dW_E7tVnfbHhHwQT_l0SUqvcbYpo,2582
|
|
83
|
-
sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=
|
|
84
|
-
sempy_labs/lakehouse/_lakehouse.py,sha256=
|
|
97
|
+
sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=W5ZNC52v79FBXBhHwmhnyQHBuy-PnDJyC5OX4zf-h_4,8802
|
|
98
|
+
sempy_labs/lakehouse/_lakehouse.py,sha256=_yn0ySUrJQD9nySa3gFpEGr6AvF-vOKIMNJruotfxHQ,5224
|
|
85
99
|
sempy_labs/lakehouse/_shortcuts.py,sha256=MT_Cqog5cTMz9fN3M_ZjAaQSjXXiyCyPWGY8LbaXZsI,6977
|
|
86
100
|
sempy_labs/migration/__init__.py,sha256=w4vvGk6wTWXVfofJDmio2yIFvSSJsxOpjv6mvNGmrOI,1043
|
|
87
101
|
sempy_labs/migration/_create_pqt_file.py,sha256=oYoKD78K9Ox1fqtkh-BfU_G5nUIoK_-5ChvCKDsYsWU,9257
|
|
88
|
-
sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=
|
|
102
|
+
sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=y5fDjqgl-rpXgZWMGagLQS_aUqJ2ksWLR-cnriWJO7Q,17986
|
|
89
103
|
sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=GC3zthtCsESLl_Mao-3C01_CzbfGBDTaEdq6k0DT2yQ,6203
|
|
90
104
|
sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=DAXz5TwPlrDxxciBp3NrTOlnkjeKaOYfntWMgyCXI10,23318
|
|
91
105
|
sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=TX0NIffDocbK1B4cfssUHXjOG1htcaFOFWzDsBCGsi0,6515
|
|
92
106
|
sempy_labs/migration/_migration_validation.py,sha256=ZsUdVlBmo03ycaZE6fFRRGU6qpEDZ_lcN8C-iuAcC30,2738
|
|
93
107
|
sempy_labs/migration/_refresh_calc_tables.py,sha256=eDj0OJQ07Tum4umZH0NsUW5Rx_YXEpGnAu8OVVoQ4yk,5190
|
|
94
108
|
sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
|
|
95
|
-
sempy_labs/report/__init__.py,sha256=
|
|
96
|
-
sempy_labs/report/_generate_report.py,sha256=
|
|
109
|
+
sempy_labs/report/__init__.py,sha256=LqbIi1SnB532l79ldsFbeIkk-6dEnWkJYgNCaF2IR08,1056
|
|
110
|
+
sempy_labs/report/_generate_report.py,sha256=d7GVgLP77TApY4EKgvsvMwEYFo1Yl2_al8i8FCB6FPM,12179
|
|
111
|
+
sempy_labs/report/_report_bpa.py,sha256=vPUCgGXgMbKBlFj3wFVOko2hWiuxrdTf9G-eSOfq3tQ,13667
|
|
112
|
+
sempy_labs/report/_report_bpa_rules.py,sha256=tPVGA0hmE6QMLlWtig7Va7Ksr2yXWl_Lndq--tWWd6w,4959
|
|
97
113
|
sempy_labs/report/_report_functions.py,sha256=qY2lE9tyf-xQo8Fdu2yl2nneiMMM6LFkwlqnyAOJjgg,29318
|
|
98
|
-
sempy_labs/report/
|
|
114
|
+
sempy_labs/report/_report_helper.py,sha256=fkSo5m3_KlAlo-fu8FTnxINigWbZI66ex-r44WalKsw,8711
|
|
115
|
+
sempy_labs/report/_report_list_functions.py,sha256=4k-bPEi4uW_ozHTZNc_67idP1LQZPT-gO9ToRCv06fk,3127
|
|
116
|
+
sempy_labs/report/_report_rebind.py,sha256=F1gXE-VM_812EFOfqbMDnAdynVfVKKx9Cvs31Hnuras,5004
|
|
117
|
+
sempy_labs/report/_reportwrapper.py,sha256=NczgthYYI7oAgrm2yXp5Z1aocxqoXAdhnXI06wRd3s0,75719
|
|
99
118
|
sempy_labs/report/_bpareporttemplate/.platform,sha256=kWRa6B_KwSYLsvVFDx372mQriQO8v7dJ_YzQV_cfD-Q,303
|
|
100
119
|
sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
|
|
101
120
|
sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json,sha256=kzjBlNdjbsSBBSHBwbQc298AJCr9Vp6Ex0D5PemUuT0,1578
|
|
@@ -126,9 +145,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
|
|
|
126
145
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
|
|
127
146
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
|
|
128
147
|
sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
|
|
129
|
-
sempy_labs/tom/_model.py,sha256=
|
|
130
|
-
semantic_link_labs-0.
|
|
131
|
-
semantic_link_labs-0.
|
|
132
|
-
semantic_link_labs-0.
|
|
133
|
-
semantic_link_labs-0.
|
|
134
|
-
semantic_link_labs-0.
|
|
148
|
+
sempy_labs/tom/_model.py,sha256=tfC241UprOx8ZLGqnSnaAzi20qlghESc0uK95i2HaAs,165380
|
|
149
|
+
semantic_link_labs-0.8.1.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
150
|
+
semantic_link_labs-0.8.1.dist-info/METADATA,sha256=PAEPaAlOsKlZnC2R4EYve78W2UVDg9tt8NqJ9UxCksA,15712
|
|
151
|
+
semantic_link_labs-0.8.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
152
|
+
semantic_link_labs-0.8.1.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
|
|
153
|
+
semantic_link_labs-0.8.1.dist-info/RECORD,,
|
sempy_labs/__init__.py
CHANGED
|
@@ -1,9 +1,77 @@
|
|
|
1
|
+
from sempy_labs._ml_models import (
|
|
2
|
+
list_ml_models,
|
|
3
|
+
create_ml_model,
|
|
4
|
+
delete_ml_model,
|
|
5
|
+
)
|
|
6
|
+
from sempy_labs._ml_experiments import (
|
|
7
|
+
list_ml_experiments,
|
|
8
|
+
create_ml_experiment,
|
|
9
|
+
delete_ml_experiment,
|
|
10
|
+
)
|
|
11
|
+
from sempy_labs._warehouses import (
|
|
12
|
+
create_warehouse,
|
|
13
|
+
list_warehouses,
|
|
14
|
+
delete_warehouse,
|
|
15
|
+
)
|
|
16
|
+
from sempy_labs._data_pipelines import (
|
|
17
|
+
list_data_pipelines,
|
|
18
|
+
create_data_pipeline,
|
|
19
|
+
delete_data_pipeline,
|
|
20
|
+
)
|
|
21
|
+
from sempy_labs._eventhouses import (
|
|
22
|
+
create_eventhouse,
|
|
23
|
+
list_eventhouses,
|
|
24
|
+
delete_eventhouse,
|
|
25
|
+
)
|
|
26
|
+
from sempy_labs._eventstreams import (
|
|
27
|
+
list_eventstreams,
|
|
28
|
+
create_eventstream,
|
|
29
|
+
delete_eventstream,
|
|
30
|
+
)
|
|
31
|
+
from sempy_labs._kql_querysets import (
|
|
32
|
+
list_kql_querysets,
|
|
33
|
+
create_kql_queryset,
|
|
34
|
+
delete_kql_queryset,
|
|
35
|
+
)
|
|
36
|
+
from sempy_labs._kql_databases import (
|
|
37
|
+
list_kql_databases,
|
|
38
|
+
create_kql_database,
|
|
39
|
+
delete_kql_database,
|
|
40
|
+
)
|
|
41
|
+
from sempy_labs._mirrored_warehouses import list_mirrored_warehouses
|
|
1
42
|
from sempy_labs._environments import (
|
|
2
43
|
create_environment,
|
|
3
44
|
delete_environment,
|
|
4
45
|
publish_environment,
|
|
5
46
|
)
|
|
6
|
-
|
|
47
|
+
from sempy_labs._clear_cache import (
|
|
48
|
+
clear_cache,
|
|
49
|
+
backup_semantic_model,
|
|
50
|
+
restore_semantic_model,
|
|
51
|
+
copy_semantic_model_backup_file,
|
|
52
|
+
list_backups,
|
|
53
|
+
list_storage_account_files,
|
|
54
|
+
)
|
|
55
|
+
from sempy_labs._capacity_migration import (
|
|
56
|
+
migrate_spark_settings,
|
|
57
|
+
migrate_workspaces,
|
|
58
|
+
migrate_capacities,
|
|
59
|
+
migrate_notification_settings,
|
|
60
|
+
migrate_access_settings,
|
|
61
|
+
migrate_delegated_tenant_settings,
|
|
62
|
+
migrate_capacity_settings,
|
|
63
|
+
migrate_disaster_recovery_settings,
|
|
64
|
+
)
|
|
65
|
+
from sempy_labs._capacities import (
|
|
66
|
+
create_fabric_capacity,
|
|
67
|
+
resume_fabric_capacity,
|
|
68
|
+
suspend_fabric_capacity,
|
|
69
|
+
update_fabric_capacity,
|
|
70
|
+
delete_fabric_capacity,
|
|
71
|
+
check_fabric_capacity_name_availablility,
|
|
72
|
+
delete_embedded_capacity,
|
|
73
|
+
delete_premium_capacity,
|
|
74
|
+
)
|
|
7
75
|
from sempy_labs._spark import (
|
|
8
76
|
get_spark_settings,
|
|
9
77
|
update_spark_settings,
|
|
@@ -12,7 +80,6 @@ from sempy_labs._spark import (
|
|
|
12
80
|
delete_custom_pool,
|
|
13
81
|
update_custom_pool,
|
|
14
82
|
)
|
|
15
|
-
|
|
16
83
|
from sempy_labs._workspaces import (
|
|
17
84
|
list_workspace_users,
|
|
18
85
|
update_workspace_user,
|
|
@@ -28,16 +95,7 @@ from sempy_labs._notebooks import (
|
|
|
28
95
|
)
|
|
29
96
|
from sempy_labs._sql import (
|
|
30
97
|
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,
|
|
98
|
+
ConnectLakehouse,
|
|
41
99
|
)
|
|
42
100
|
from sempy_labs._workspace_identity import (
|
|
43
101
|
provision_workspace_identity,
|
|
@@ -62,14 +120,6 @@ from sempy_labs._dataflows import (
|
|
|
62
120
|
assign_workspace_to_dataflow_storage,
|
|
63
121
|
list_dataflows,
|
|
64
122
|
)
|
|
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
123
|
from sempy_labs._connections import (
|
|
74
124
|
list_connections,
|
|
75
125
|
list_item_connections,
|
|
@@ -88,34 +138,24 @@ from sempy_labs._generate_semantic_model import (
|
|
|
88
138
|
)
|
|
89
139
|
from sempy_labs._list_functions import (
|
|
90
140
|
list_reports_using_semantic_model,
|
|
141
|
+
list_semantic_model_object_report_usage,
|
|
142
|
+
list_report_semantic_model_objects,
|
|
91
143
|
list_semantic_model_objects,
|
|
92
144
|
list_shortcuts,
|
|
93
145
|
get_object_level_security,
|
|
94
146
|
list_capacities,
|
|
95
|
-
# list_annotations,
|
|
96
|
-
# list_columns,
|
|
97
147
|
list_dashboards,
|
|
98
|
-
|
|
99
|
-
# list_datapipelines,
|
|
100
|
-
# list_eventstreams,
|
|
101
|
-
# list_kpis,
|
|
102
|
-
# list_kqldatabases,
|
|
103
|
-
# list_kqlquerysets,
|
|
148
|
+
list_datamarts,
|
|
104
149
|
list_lakehouses,
|
|
105
|
-
|
|
106
|
-
# list_mlexperiments,
|
|
107
|
-
# list_mlmodels,
|
|
108
|
-
# list_relationships,
|
|
109
|
-
# list_sqlendpoints,
|
|
110
|
-
# list_tables,
|
|
111
|
-
list_warehouses,
|
|
112
|
-
create_warehouse,
|
|
150
|
+
list_sql_endpoints,
|
|
113
151
|
update_item,
|
|
114
152
|
)
|
|
115
153
|
from sempy_labs._helper_functions import (
|
|
154
|
+
convert_to_friendly_case,
|
|
116
155
|
resolve_environment_id,
|
|
117
156
|
resolve_capacity_id,
|
|
118
157
|
resolve_warehouse_id,
|
|
158
|
+
resolve_dataset_from_report,
|
|
119
159
|
resolve_workspace_capacity,
|
|
120
160
|
create_abfss_path,
|
|
121
161
|
format_dax_object_name,
|
|
@@ -134,10 +174,7 @@ from sempy_labs._helper_functions import (
|
|
|
134
174
|
get_capacity_id,
|
|
135
175
|
get_capacity_name,
|
|
136
176
|
resolve_capacity_name,
|
|
137
|
-
# language_validate
|
|
138
177
|
)
|
|
139
|
-
|
|
140
|
-
# from sempy_labs._model_auto_build import model_auto_build
|
|
141
178
|
from sempy_labs._model_bpa_bulk import (
|
|
142
179
|
run_model_bpa_bulk,
|
|
143
180
|
create_model_bpa_semantic_model,
|
|
@@ -168,13 +205,13 @@ from sempy_labs._refresh_semantic_model import (
|
|
|
168
205
|
from sempy_labs._translations import translate_semantic_model
|
|
169
206
|
from sempy_labs._vertipaq import (
|
|
170
207
|
vertipaq_analyzer,
|
|
171
|
-
# visualize_vertipaq,
|
|
172
208
|
import_vertipaq_analyzer,
|
|
173
209
|
)
|
|
174
210
|
|
|
175
211
|
__all__ = [
|
|
176
212
|
"resolve_warehouse_id",
|
|
177
213
|
"ConnectWarehouse",
|
|
214
|
+
"ConnectLakehouse",
|
|
178
215
|
"update_semantic_model_from_bim",
|
|
179
216
|
"list_connections",
|
|
180
217
|
"get_semantic_model_size",
|
|
@@ -186,6 +223,10 @@ __all__ = [
|
|
|
186
223
|
"list_storage_account_files",
|
|
187
224
|
"backup_semantic_model",
|
|
188
225
|
"restore_semantic_model",
|
|
226
|
+
"list_semantic_model_object_report_usage",
|
|
227
|
+
"list_report_semantic_model_objects",
|
|
228
|
+
"migrate_spark_settings",
|
|
229
|
+
"create_azure_storage_account",
|
|
189
230
|
"delete_custom_pool",
|
|
190
231
|
"clear_cache",
|
|
191
232
|
# create_connection_cloud,
|
|
@@ -197,26 +238,13 @@ __all__ = [
|
|
|
197
238
|
"deploy_semantic_model",
|
|
198
239
|
"get_semantic_model_bim",
|
|
199
240
|
"get_object_level_security",
|
|
200
|
-
#'list_annotations',
|
|
201
|
-
#'list_columns',
|
|
202
241
|
"list_dashboards",
|
|
203
242
|
"list_dataflow_storage_accounts",
|
|
204
|
-
#'list_datamarts',
|
|
205
|
-
#'list_datapipelines',
|
|
206
|
-
#'list_eventstreams',
|
|
207
|
-
#'list_kpis',
|
|
208
|
-
#'list_kqldatabases',
|
|
209
|
-
#'list_kqlquerysets',
|
|
210
243
|
"list_lakehouses",
|
|
211
|
-
#'list_mirroredwarehouses',
|
|
212
|
-
#'list_mlexperiments',
|
|
213
|
-
#'list_mlmodels',
|
|
214
|
-
#'list_relationships',
|
|
215
|
-
#'list_sqlendpoints',
|
|
216
|
-
#'list_tables',
|
|
217
244
|
"list_warehouses",
|
|
218
245
|
"list_workspace_role_assignments",
|
|
219
246
|
"create_warehouse",
|
|
247
|
+
"delete_warehouse",
|
|
220
248
|
"update_item",
|
|
221
249
|
"create_abfss_path",
|
|
222
250
|
"format_dax_object_name",
|
|
@@ -230,8 +258,6 @@ __all__ = [
|
|
|
230
258
|
"resolve_dataset_name",
|
|
231
259
|
"resolve_report_id",
|
|
232
260
|
"resolve_report_name",
|
|
233
|
-
# 'language_validate',
|
|
234
|
-
# "model_auto_build",
|
|
235
261
|
"model_bpa_rules",
|
|
236
262
|
"run_model_bpa",
|
|
237
263
|
"measure_dependency_tree",
|
|
@@ -249,7 +275,6 @@ __all__ = [
|
|
|
249
275
|
"cancel_dataset_refresh",
|
|
250
276
|
"translate_semantic_model",
|
|
251
277
|
"vertipaq_analyzer",
|
|
252
|
-
# 'visualize_vertipaq',
|
|
253
278
|
"import_vertipaq_analyzer",
|
|
254
279
|
"list_semantic_model_objects",
|
|
255
280
|
"list_shortcuts",
|
|
@@ -297,8 +322,41 @@ __all__ = [
|
|
|
297
322
|
"delete_fabric_capacity",
|
|
298
323
|
"resume_fabric_capacity",
|
|
299
324
|
"update_fabric_capacity",
|
|
300
|
-
"create_fabric_capacity",
|
|
301
325
|
"delete_premium_capacity",
|
|
302
326
|
"suspend_fabric_capacity",
|
|
303
327
|
"delete_embedded_capacity",
|
|
328
|
+
"resolve_dataset_from_report",
|
|
329
|
+
"migrate_workspaces",
|
|
330
|
+
"migrate_capacities",
|
|
331
|
+
"create_fabric_capacity",
|
|
332
|
+
"migrate_capacity_settings",
|
|
333
|
+
"migrate_disaster_recovery_settings",
|
|
334
|
+
"migrate_notification_settings",
|
|
335
|
+
"migrate_access_settings",
|
|
336
|
+
"migrate_delegated_tenant_settings",
|
|
337
|
+
"convert_to_friendly_case",
|
|
338
|
+
"list_mirrored_warehouses",
|
|
339
|
+
"list_kql_databases",
|
|
340
|
+
"create_kql_database",
|
|
341
|
+
"delete_kql_database",
|
|
342
|
+
"create_eventhouse",
|
|
343
|
+
"list_eventhouses",
|
|
344
|
+
"delete_eventhouse",
|
|
345
|
+
"list_data_pipelines",
|
|
346
|
+
"create_data_pipeline",
|
|
347
|
+
"delete_data_pipeline",
|
|
348
|
+
"list_eventstreams",
|
|
349
|
+
"create_eventstream",
|
|
350
|
+
"delete_eventstream",
|
|
351
|
+
"list_kql_querysets",
|
|
352
|
+
"create_kql_queryset",
|
|
353
|
+
"delete_kql_queryset",
|
|
354
|
+
"list_ml_models",
|
|
355
|
+
"create_ml_model",
|
|
356
|
+
"delete_ml_model",
|
|
357
|
+
"list_ml_experiments",
|
|
358
|
+
"create_ml_experiment",
|
|
359
|
+
"delete_ml_experiment",
|
|
360
|
+
"list_sql_endpoints",
|
|
361
|
+
"list_datamarts",
|
|
304
362
|
]
|
sempy_labs/_ai.py
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import sempy
|
|
2
2
|
import sempy.fabric as fabric
|
|
3
3
|
import pandas as pd
|
|
4
|
-
from synapse.ml.services.openai import OpenAICompletion
|
|
5
|
-
from pyspark.sql.functions import col
|
|
6
4
|
from pyspark.sql import SparkSession
|
|
7
5
|
from typing import List, Optional, Union
|
|
8
6
|
from IPython.display import display
|
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(
|
|
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
|
|
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 !=
|
|
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.")
|