semantic-link-labs 0.12.8__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.
- semantic_link_labs-0.12.8.dist-info/METADATA +354 -0
- semantic_link_labs-0.12.8.dist-info/RECORD +243 -0
- semantic_link_labs-0.12.8.dist-info/WHEEL +5 -0
- semantic_link_labs-0.12.8.dist-info/licenses/LICENSE +21 -0
- semantic_link_labs-0.12.8.dist-info/top_level.txt +1 -0
- sempy_labs/__init__.py +606 -0
- sempy_labs/_a_lib_info.py +2 -0
- sempy_labs/_ai.py +437 -0
- sempy_labs/_authentication.py +264 -0
- sempy_labs/_bpa_translation/_model/_translations_am-ET.po +869 -0
- sempy_labs/_bpa_translation/_model/_translations_ar-AE.po +908 -0
- sempy_labs/_bpa_translation/_model/_translations_bg-BG.po +968 -0
- sempy_labs/_bpa_translation/_model/_translations_ca-ES.po +963 -0
- sempy_labs/_bpa_translation/_model/_translations_cs-CZ.po +943 -0
- sempy_labs/_bpa_translation/_model/_translations_da-DK.po +945 -0
- sempy_labs/_bpa_translation/_model/_translations_de-DE.po +988 -0
- sempy_labs/_bpa_translation/_model/_translations_el-GR.po +993 -0
- sempy_labs/_bpa_translation/_model/_translations_es-ES.po +971 -0
- sempy_labs/_bpa_translation/_model/_translations_fa-IR.po +933 -0
- sempy_labs/_bpa_translation/_model/_translations_fi-FI.po +942 -0
- sempy_labs/_bpa_translation/_model/_translations_fr-FR.po +994 -0
- sempy_labs/_bpa_translation/_model/_translations_ga-IE.po +967 -0
- sempy_labs/_bpa_translation/_model/_translations_he-IL.po +902 -0
- sempy_labs/_bpa_translation/_model/_translations_hi-IN.po +944 -0
- sempy_labs/_bpa_translation/_model/_translations_hu-HU.po +963 -0
- sempy_labs/_bpa_translation/_model/_translations_id-ID.po +946 -0
- sempy_labs/_bpa_translation/_model/_translations_is-IS.po +939 -0
- sempy_labs/_bpa_translation/_model/_translations_it-IT.po +986 -0
- sempy_labs/_bpa_translation/_model/_translations_ja-JP.po +846 -0
- sempy_labs/_bpa_translation/_model/_translations_ko-KR.po +839 -0
- sempy_labs/_bpa_translation/_model/_translations_mt-MT.po +967 -0
- sempy_labs/_bpa_translation/_model/_translations_nl-NL.po +978 -0
- sempy_labs/_bpa_translation/_model/_translations_pl-PL.po +962 -0
- sempy_labs/_bpa_translation/_model/_translations_pt-BR.po +962 -0
- sempy_labs/_bpa_translation/_model/_translations_pt-PT.po +957 -0
- sempy_labs/_bpa_translation/_model/_translations_ro-RO.po +968 -0
- sempy_labs/_bpa_translation/_model/_translations_ru-RU.po +964 -0
- sempy_labs/_bpa_translation/_model/_translations_sk-SK.po +952 -0
- sempy_labs/_bpa_translation/_model/_translations_sl-SL.po +950 -0
- sempy_labs/_bpa_translation/_model/_translations_sv-SE.po +942 -0
- sempy_labs/_bpa_translation/_model/_translations_ta-IN.po +976 -0
- sempy_labs/_bpa_translation/_model/_translations_te-IN.po +947 -0
- sempy_labs/_bpa_translation/_model/_translations_th-TH.po +924 -0
- sempy_labs/_bpa_translation/_model/_translations_tr-TR.po +953 -0
- sempy_labs/_bpa_translation/_model/_translations_uk-UA.po +961 -0
- sempy_labs/_bpa_translation/_model/_translations_zh-CN.po +804 -0
- sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po +969 -0
- sempy_labs/_capacities.py +1198 -0
- sempy_labs/_capacity_migration.py +660 -0
- sempy_labs/_clear_cache.py +351 -0
- sempy_labs/_connections.py +610 -0
- sempy_labs/_dashboards.py +69 -0
- sempy_labs/_data_access_security.py +98 -0
- sempy_labs/_data_pipelines.py +162 -0
- sempy_labs/_dataflows.py +668 -0
- sempy_labs/_dax.py +501 -0
- sempy_labs/_daxformatter.py +80 -0
- sempy_labs/_delta_analyzer.py +467 -0
- sempy_labs/_delta_analyzer_history.py +301 -0
- sempy_labs/_dictionary_diffs.py +221 -0
- sempy_labs/_documentation.py +147 -0
- sempy_labs/_domains.py +51 -0
- sempy_labs/_eventhouses.py +182 -0
- sempy_labs/_external_data_shares.py +230 -0
- sempy_labs/_gateways.py +521 -0
- sempy_labs/_generate_semantic_model.py +521 -0
- sempy_labs/_get_connection_string.py +84 -0
- sempy_labs/_git.py +543 -0
- sempy_labs/_graphQL.py +90 -0
- sempy_labs/_helper_functions.py +2833 -0
- sempy_labs/_icons.py +149 -0
- sempy_labs/_job_scheduler.py +609 -0
- sempy_labs/_kql_databases.py +149 -0
- sempy_labs/_kql_querysets.py +124 -0
- sempy_labs/_kusto.py +137 -0
- sempy_labs/_labels.py +124 -0
- sempy_labs/_list_functions.py +1720 -0
- sempy_labs/_managed_private_endpoints.py +253 -0
- sempy_labs/_mirrored_databases.py +416 -0
- sempy_labs/_mirrored_warehouses.py +60 -0
- sempy_labs/_ml_experiments.py +113 -0
- sempy_labs/_model_auto_build.py +140 -0
- sempy_labs/_model_bpa.py +557 -0
- sempy_labs/_model_bpa_bulk.py +378 -0
- sempy_labs/_model_bpa_rules.py +859 -0
- sempy_labs/_model_dependencies.py +343 -0
- sempy_labs/_mounted_data_factories.py +123 -0
- sempy_labs/_notebooks.py +441 -0
- sempy_labs/_one_lake_integration.py +151 -0
- sempy_labs/_onelake.py +131 -0
- sempy_labs/_query_scale_out.py +433 -0
- sempy_labs/_refresh_semantic_model.py +435 -0
- sempy_labs/_semantic_models.py +468 -0
- sempy_labs/_spark.py +455 -0
- sempy_labs/_sql.py +241 -0
- sempy_labs/_sql_audit_settings.py +207 -0
- sempy_labs/_sql_endpoints.py +214 -0
- sempy_labs/_tags.py +201 -0
- sempy_labs/_translations.py +43 -0
- sempy_labs/_user_delegation_key.py +44 -0
- sempy_labs/_utils.py +79 -0
- sempy_labs/_vertipaq.py +1021 -0
- sempy_labs/_vpax.py +388 -0
- sempy_labs/_warehouses.py +234 -0
- sempy_labs/_workloads.py +140 -0
- sempy_labs/_workspace_identity.py +72 -0
- sempy_labs/_workspaces.py +595 -0
- sempy_labs/admin/__init__.py +170 -0
- sempy_labs/admin/_activities.py +167 -0
- sempy_labs/admin/_apps.py +145 -0
- sempy_labs/admin/_artifacts.py +65 -0
- sempy_labs/admin/_basic_functions.py +463 -0
- sempy_labs/admin/_capacities.py +508 -0
- sempy_labs/admin/_dataflows.py +45 -0
- sempy_labs/admin/_datasets.py +186 -0
- sempy_labs/admin/_domains.py +522 -0
- sempy_labs/admin/_external_data_share.py +100 -0
- sempy_labs/admin/_git.py +72 -0
- sempy_labs/admin/_items.py +265 -0
- sempy_labs/admin/_labels.py +211 -0
- sempy_labs/admin/_reports.py +241 -0
- sempy_labs/admin/_scanner.py +118 -0
- sempy_labs/admin/_shared.py +82 -0
- sempy_labs/admin/_sharing_links.py +110 -0
- sempy_labs/admin/_tags.py +131 -0
- sempy_labs/admin/_tenant.py +503 -0
- sempy_labs/admin/_tenant_keys.py +89 -0
- sempy_labs/admin/_users.py +140 -0
- sempy_labs/admin/_workspaces.py +236 -0
- sempy_labs/deployment_pipeline/__init__.py +23 -0
- sempy_labs/deployment_pipeline/_items.py +580 -0
- sempy_labs/directlake/__init__.py +57 -0
- sempy_labs/directlake/_autosync.py +58 -0
- sempy_labs/directlake/_directlake_schema_compare.py +120 -0
- sempy_labs/directlake/_directlake_schema_sync.py +161 -0
- sempy_labs/directlake/_dl_helper.py +274 -0
- sempy_labs/directlake/_generate_shared_expression.py +94 -0
- sempy_labs/directlake/_get_directlake_lakehouse.py +62 -0
- sempy_labs/directlake/_get_shared_expression.py +34 -0
- sempy_labs/directlake/_guardrails.py +96 -0
- sempy_labs/directlake/_list_directlake_model_calc_tables.py +70 -0
- sempy_labs/directlake/_show_unsupported_directlake_objects.py +90 -0
- sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py +239 -0
- sempy_labs/directlake/_update_directlake_partition_entity.py +259 -0
- sempy_labs/directlake/_warm_cache.py +236 -0
- sempy_labs/dotnet_lib/dotnet.runtime.config.json +10 -0
- sempy_labs/environment/__init__.py +23 -0
- sempy_labs/environment/_items.py +212 -0
- sempy_labs/environment/_pubstage.py +223 -0
- sempy_labs/eventstream/__init__.py +37 -0
- sempy_labs/eventstream/_items.py +263 -0
- sempy_labs/eventstream/_topology.py +652 -0
- sempy_labs/graph/__init__.py +59 -0
- sempy_labs/graph/_groups.py +651 -0
- sempy_labs/graph/_sensitivity_labels.py +120 -0
- sempy_labs/graph/_teams.py +125 -0
- sempy_labs/graph/_user_licenses.py +96 -0
- sempy_labs/graph/_users.py +516 -0
- sempy_labs/graph_model/__init__.py +15 -0
- sempy_labs/graph_model/_background_jobs.py +63 -0
- sempy_labs/graph_model/_items.py +149 -0
- sempy_labs/lakehouse/__init__.py +67 -0
- sempy_labs/lakehouse/_blobs.py +247 -0
- sempy_labs/lakehouse/_get_lakehouse_columns.py +102 -0
- sempy_labs/lakehouse/_get_lakehouse_tables.py +274 -0
- sempy_labs/lakehouse/_helper.py +250 -0
- sempy_labs/lakehouse/_lakehouse.py +351 -0
- sempy_labs/lakehouse/_livy_sessions.py +143 -0
- sempy_labs/lakehouse/_materialized_lake_views.py +157 -0
- sempy_labs/lakehouse/_partitioning.py +165 -0
- sempy_labs/lakehouse/_schemas.py +217 -0
- sempy_labs/lakehouse/_shortcuts.py +440 -0
- sempy_labs/migration/__init__.py +35 -0
- sempy_labs/migration/_create_pqt_file.py +238 -0
- sempy_labs/migration/_direct_lake_to_import.py +105 -0
- sempy_labs/migration/_migrate_calctables_to_lakehouse.py +398 -0
- sempy_labs/migration/_migrate_calctables_to_semantic_model.py +148 -0
- sempy_labs/migration/_migrate_model_objects_to_semantic_model.py +533 -0
- sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py +172 -0
- sempy_labs/migration/_migration_validation.py +71 -0
- sempy_labs/migration/_refresh_calc_tables.py +131 -0
- sempy_labs/mirrored_azure_databricks_catalog/__init__.py +15 -0
- sempy_labs/mirrored_azure_databricks_catalog/_discover.py +213 -0
- sempy_labs/mirrored_azure_databricks_catalog/_refresh_catalog_metadata.py +45 -0
- sempy_labs/ml_model/__init__.py +23 -0
- sempy_labs/ml_model/_functions.py +427 -0
- sempy_labs/report/_BPAReportTemplate.json +232 -0
- sempy_labs/report/__init__.py +55 -0
- sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json +9 -0
- sempy_labs/report/_bpareporttemplate/.platform +11 -0
- sempy_labs/report/_bpareporttemplate/StaticResources/SharedResources/BaseThemes/CY24SU06.json +710 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/page.json +11 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/1b08bce3bebabb0a27a8/visual.json +191 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/2f22ddb70c301693c165/visual.json +438 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/3b1182230aa6c600b43a/visual.json +127 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/58577ba6380c69891500/visual.json +576 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/a2a8fa5028b3b776c96c/visual.json +207 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/adfd47ef30652707b987/visual.json +506 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/b6a80ee459e716e170b1/visual.json +127 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/01d72098bda5055bd500/visuals/ce3130a721c020cc3d81/visual.json +513 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/92735ae19b31712208ad/page.json +8 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/92735ae19b31712208ad/visuals/66e60dfb526437cd78d1/visual.json +112 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/page.json +11 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/07deb8bce824e1be37d7/visual.json +513 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/0b1c68838818b32ad03b/visual.json +352 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/0c171de9d2683d10b930/visual.json +37 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/0efa01be0510e40a645e/visual.json +542 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/6bf2f0eb830ab53cc668/visual.json +221 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/88d8141cb8500b60030c/visual.json +127 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/a753273590beed656a03/visual.json +576 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visuals/b8fdc82cddd61ac447bc/visual.json +127 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json +9 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json +38 -0
- sempy_labs/report/_bpareporttemplate/definition/pages/pages.json +10 -0
- sempy_labs/report/_bpareporttemplate/definition/report.json +176 -0
- sempy_labs/report/_bpareporttemplate/definition/version.json +4 -0
- sempy_labs/report/_bpareporttemplate/definition.pbir +14 -0
- sempy_labs/report/_download_report.py +76 -0
- sempy_labs/report/_export_report.py +257 -0
- sempy_labs/report/_generate_report.py +427 -0
- sempy_labs/report/_paginated.py +76 -0
- sempy_labs/report/_report_bpa.py +354 -0
- sempy_labs/report/_report_bpa_rules.py +115 -0
- sempy_labs/report/_report_functions.py +581 -0
- sempy_labs/report/_report_helper.py +227 -0
- sempy_labs/report/_report_list_functions.py +110 -0
- sempy_labs/report/_report_rebind.py +149 -0
- sempy_labs/report/_reportwrapper.py +3100 -0
- sempy_labs/report/_save_report.py +147 -0
- sempy_labs/snowflake_database/__init__.py +10 -0
- sempy_labs/snowflake_database/_items.py +105 -0
- sempy_labs/sql_database/__init__.py +21 -0
- sempy_labs/sql_database/_items.py +201 -0
- sempy_labs/sql_database/_mirroring.py +79 -0
- sempy_labs/theme/__init__.py +12 -0
- sempy_labs/theme/_org_themes.py +129 -0
- sempy_labs/tom/__init__.py +3 -0
- sempy_labs/tom/_model.py +5977 -0
- sempy_labs/variable_library/__init__.py +19 -0
- sempy_labs/variable_library/_functions.py +403 -0
- sempy_labs/warehouse/__init__.py +28 -0
- sempy_labs/warehouse/_items.py +234 -0
- sempy_labs/warehouse/_restore_points.py +309 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
from ._users import (
|
|
2
|
+
list_access_entities,
|
|
3
|
+
list_user_subscriptions,
|
|
4
|
+
)
|
|
5
|
+
from ._workspaces import (
|
|
6
|
+
add_user_to_workspace,
|
|
7
|
+
delete_user_from_workspace,
|
|
8
|
+
restore_deleted_workspace,
|
|
9
|
+
list_orphaned_workspaces,
|
|
10
|
+
)
|
|
11
|
+
from ._artifacts import (
|
|
12
|
+
list_unused_artifacts,
|
|
13
|
+
)
|
|
14
|
+
from ._shared import (
|
|
15
|
+
list_widely_shared_artifacts,
|
|
16
|
+
)
|
|
17
|
+
from ._datasets import (
|
|
18
|
+
list_datasets,
|
|
19
|
+
list_dataset_users,
|
|
20
|
+
)
|
|
21
|
+
from ._apps import (
|
|
22
|
+
list_apps,
|
|
23
|
+
list_app_users,
|
|
24
|
+
)
|
|
25
|
+
from ._reports import (
|
|
26
|
+
list_reports,
|
|
27
|
+
list_report_users,
|
|
28
|
+
list_report_subscriptions,
|
|
29
|
+
)
|
|
30
|
+
from ._activities import (
|
|
31
|
+
list_activity_events,
|
|
32
|
+
)
|
|
33
|
+
from ._scanner import (
|
|
34
|
+
scan_workspaces,
|
|
35
|
+
)
|
|
36
|
+
from ._capacities import (
|
|
37
|
+
patch_capacity,
|
|
38
|
+
list_capacities,
|
|
39
|
+
get_capacity_assignment_status,
|
|
40
|
+
get_capacity_state,
|
|
41
|
+
list_capacity_users,
|
|
42
|
+
get_refreshables,
|
|
43
|
+
)
|
|
44
|
+
from ._tenant import (
|
|
45
|
+
list_tenant_settings,
|
|
46
|
+
delete_capacity_tenant_setting_override,
|
|
47
|
+
update_tenant_setting,
|
|
48
|
+
update_capacity_tenant_setting_override,
|
|
49
|
+
list_workspaces_tenant_settings_overrides,
|
|
50
|
+
list_capacity_tenant_settings_overrides,
|
|
51
|
+
list_capacities_delegated_tenant_settings,
|
|
52
|
+
list_domain_tenant_settings_overrides,
|
|
53
|
+
)
|
|
54
|
+
from ._basic_functions import (
|
|
55
|
+
assign_workspaces_to_capacity,
|
|
56
|
+
unassign_workspaces_from_capacity,
|
|
57
|
+
list_workspaces,
|
|
58
|
+
list_workspace_access_details,
|
|
59
|
+
list_modified_workspaces,
|
|
60
|
+
list_workspace_users,
|
|
61
|
+
)
|
|
62
|
+
from ._domains import (
|
|
63
|
+
list_domains,
|
|
64
|
+
list_domain_workspaces,
|
|
65
|
+
assign_domain_workspaces,
|
|
66
|
+
assign_domain_workspaces_by_capacities,
|
|
67
|
+
create_domain,
|
|
68
|
+
update_domain,
|
|
69
|
+
delete_domain,
|
|
70
|
+
resolve_domain_id,
|
|
71
|
+
unassign_domain_workspaces,
|
|
72
|
+
unassign_all_domain_workspaces,
|
|
73
|
+
)
|
|
74
|
+
from ._items import (
|
|
75
|
+
list_item_access_details,
|
|
76
|
+
list_items,
|
|
77
|
+
)
|
|
78
|
+
from ._external_data_share import (
|
|
79
|
+
list_external_data_shares,
|
|
80
|
+
revoke_external_data_share,
|
|
81
|
+
)
|
|
82
|
+
from ._git import (
|
|
83
|
+
list_git_connections,
|
|
84
|
+
)
|
|
85
|
+
from ._dataflows import (
|
|
86
|
+
export_dataflow,
|
|
87
|
+
)
|
|
88
|
+
from ._tags import (
|
|
89
|
+
list_tags,
|
|
90
|
+
create_tags,
|
|
91
|
+
delete_tag,
|
|
92
|
+
)
|
|
93
|
+
from ._tenant_keys import (
|
|
94
|
+
list_tenant_keys,
|
|
95
|
+
rotate_tenant_key,
|
|
96
|
+
)
|
|
97
|
+
from ._sharing_links import (
|
|
98
|
+
remove_all_sharing_links,
|
|
99
|
+
remove_sharing_links,
|
|
100
|
+
)
|
|
101
|
+
from ._labels import (
|
|
102
|
+
bulk_set_labels,
|
|
103
|
+
bulk_remove_labels,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
__all__ = [
|
|
107
|
+
"list_items",
|
|
108
|
+
"list_workspace_access_details",
|
|
109
|
+
"list_access_entities",
|
|
110
|
+
"list_item_access_details",
|
|
111
|
+
"list_datasets",
|
|
112
|
+
"list_workspaces",
|
|
113
|
+
"assign_workspaces_to_capacity",
|
|
114
|
+
"list_capacities",
|
|
115
|
+
"list_tenant_settings",
|
|
116
|
+
"list_domains",
|
|
117
|
+
"list_domain_workspaces",
|
|
118
|
+
"assign_domain_workspaces",
|
|
119
|
+
"assign_domain_workspaces_by_capacities",
|
|
120
|
+
"create_domain",
|
|
121
|
+
"update_domain",
|
|
122
|
+
"delete_domain",
|
|
123
|
+
"resolve_domain_id",
|
|
124
|
+
"unassign_domain_workspaces",
|
|
125
|
+
"unassign_all_domain_workspaces",
|
|
126
|
+
"list_capacities_delegated_tenant_settings",
|
|
127
|
+
"unassign_workspaces_from_capacity",
|
|
128
|
+
"list_external_data_shares",
|
|
129
|
+
"revoke_external_data_share",
|
|
130
|
+
"list_activity_events",
|
|
131
|
+
"list_modified_workspaces",
|
|
132
|
+
"list_git_connections",
|
|
133
|
+
"list_reports",
|
|
134
|
+
"get_capacity_assignment_status",
|
|
135
|
+
"scan_workspaces",
|
|
136
|
+
"get_capacity_state",
|
|
137
|
+
"list_apps",
|
|
138
|
+
"list_app_users",
|
|
139
|
+
"list_dataset_users",
|
|
140
|
+
"list_report_users",
|
|
141
|
+
"patch_capacity",
|
|
142
|
+
"list_workspace_users",
|
|
143
|
+
"list_widely_shared_artifacts",
|
|
144
|
+
"delete_capacity_tenant_setting_override",
|
|
145
|
+
"update_tenant_setting",
|
|
146
|
+
"update_capacity_tenant_setting_override",
|
|
147
|
+
"list_workspaces_tenant_settings_overrides",
|
|
148
|
+
"list_capacity_tenant_settings_overrides",
|
|
149
|
+
"list_capacities_delegated_tenant_settings",
|
|
150
|
+
"list_domain_tenant_settings_overrides",
|
|
151
|
+
"list_unused_artifacts",
|
|
152
|
+
"add_user_to_workspace",
|
|
153
|
+
"delete_user_from_workspace",
|
|
154
|
+
"restore_deleted_workspace",
|
|
155
|
+
"list_orphaned_workspaces",
|
|
156
|
+
"list_capacity_users",
|
|
157
|
+
"list_user_subscriptions",
|
|
158
|
+
"list_report_subscriptions",
|
|
159
|
+
"get_refreshables",
|
|
160
|
+
"export_dataflow",
|
|
161
|
+
"list_tags",
|
|
162
|
+
"create_tags",
|
|
163
|
+
"delete_tag",
|
|
164
|
+
"list_tenant_keys",
|
|
165
|
+
"rotate_tenant_key",
|
|
166
|
+
"remove_all_sharing_links",
|
|
167
|
+
"remove_sharing_links",
|
|
168
|
+
"bulk_set_labels",
|
|
169
|
+
"bulk_remove_labels",
|
|
170
|
+
]
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from dateutil.parser import parse as dtparser
|
|
4
|
+
from sempy._utils._log import log
|
|
5
|
+
from sempy_labs._helper_functions import (
|
|
6
|
+
_base_api,
|
|
7
|
+
_create_dataframe,
|
|
8
|
+
_update_dataframe_datatypes,
|
|
9
|
+
)
|
|
10
|
+
import sempy_labs._icons as icons
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@log
|
|
14
|
+
def list_activity_events(
|
|
15
|
+
start_time: str,
|
|
16
|
+
end_time: str,
|
|
17
|
+
activity_filter: Optional[str] = None,
|
|
18
|
+
user_id_filter: Optional[str] = None,
|
|
19
|
+
return_dataframe: bool = True,
|
|
20
|
+
) -> pd.DataFrame | dict:
|
|
21
|
+
"""
|
|
22
|
+
Shows a list of audit activity events for a tenant.
|
|
23
|
+
|
|
24
|
+
This is a wrapper function for the following API: `Admin - Get Activity Events <https://learn.microsoft.com/rest/api/power-bi/admin/get-activity-events>`_.
|
|
25
|
+
|
|
26
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
start_time : str
|
|
31
|
+
Start date and time of the window for audit event results. Example: "2024-09-25T07:55:00".
|
|
32
|
+
end_time : str
|
|
33
|
+
End date and time of the window for audit event results. Example: "2024-09-25T08:55:00".
|
|
34
|
+
activity_filter : str, default=None
|
|
35
|
+
Filter value for activities. Example: 'viewreport'.
|
|
36
|
+
user_id_filter : str, default=None
|
|
37
|
+
Email address of the user.
|
|
38
|
+
return_dataframe : bool, default=True
|
|
39
|
+
If True the response is a pandas.DataFrame. If False returns the original Json. Default True
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
pandas.DataFrame | dict
|
|
44
|
+
A pandas dataframe or json showing a list of audit activity events for a tenant.
|
|
45
|
+
"""
|
|
46
|
+
start_dt = dtparser(start_time)
|
|
47
|
+
end_dt = dtparser(end_time)
|
|
48
|
+
|
|
49
|
+
if not start_dt.date() == end_dt.date():
|
|
50
|
+
raise ValueError(
|
|
51
|
+
f"{icons.red_dot} Start and End Times must be within the same UTC day. Please refer to the documentation here: https://learn.microsoft.com/rest/api/power-bi/admin/get-activity-events#get-audit-activity-events-within-a-time-window-and-for-a-specific-activity-type-and-user-id-example"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
columns = {
|
|
55
|
+
"Id": "string",
|
|
56
|
+
"Record Type": "string",
|
|
57
|
+
"Creation Time": "datetime",
|
|
58
|
+
"Operation": "string",
|
|
59
|
+
"Organization Id": "string",
|
|
60
|
+
"User Type": "string",
|
|
61
|
+
"User Key": "string",
|
|
62
|
+
"Workload": "string",
|
|
63
|
+
"Result Status": "string",
|
|
64
|
+
"User Id": "string",
|
|
65
|
+
"Client IP": "string",
|
|
66
|
+
"User Agent": "string",
|
|
67
|
+
"Activity": "string",
|
|
68
|
+
"Workspace Name": "string",
|
|
69
|
+
"Workspace Id": "string",
|
|
70
|
+
"Object Id": "string",
|
|
71
|
+
"Request Id": "string",
|
|
72
|
+
"Object Type": "string",
|
|
73
|
+
"Object Display Name": "string",
|
|
74
|
+
"Experience": "string",
|
|
75
|
+
"Refresh Enforcement Policy": "string",
|
|
76
|
+
"Is Success": "bool",
|
|
77
|
+
"Activity Id": "string",
|
|
78
|
+
"Item Name": "string",
|
|
79
|
+
"Dataset Name": "string",
|
|
80
|
+
"Report Name": "string",
|
|
81
|
+
"Capacity Id": "string",
|
|
82
|
+
"Capacity Name": "string",
|
|
83
|
+
"App Name": "string",
|
|
84
|
+
"Dataset Id": "string",
|
|
85
|
+
"Report Id": "string",
|
|
86
|
+
"Artifact Id": "string",
|
|
87
|
+
"Artifact Name": "string",
|
|
88
|
+
"Report Type": "string",
|
|
89
|
+
"App Report Id": "string",
|
|
90
|
+
"Distribution Method": "string",
|
|
91
|
+
"Consumption Method": "string",
|
|
92
|
+
"Artifact Kind": "string",
|
|
93
|
+
}
|
|
94
|
+
df = _create_dataframe(columns=columns)
|
|
95
|
+
|
|
96
|
+
response_json = {"activityEventEntities": []}
|
|
97
|
+
url = f"/v1.0/myorg/admin/activityevents?startDateTime='{start_time}'&endDateTime='{end_time}'"
|
|
98
|
+
|
|
99
|
+
conditions = []
|
|
100
|
+
if activity_filter is not None:
|
|
101
|
+
conditions.append(f"Activity eq '{activity_filter}'")
|
|
102
|
+
if user_id_filter is not None:
|
|
103
|
+
conditions.append(f"UserId eq '{user_id_filter}'")
|
|
104
|
+
|
|
105
|
+
if conditions:
|
|
106
|
+
url += f"&$filter={f' and '.join(conditions)}"
|
|
107
|
+
|
|
108
|
+
responses = _base_api(request=url, client="fabric_sp", uses_pagination=True)
|
|
109
|
+
|
|
110
|
+
rows = []
|
|
111
|
+
for r in responses:
|
|
112
|
+
if return_dataframe:
|
|
113
|
+
for i in r.get("activityEventEntities", []):
|
|
114
|
+
rows.append(
|
|
115
|
+
{
|
|
116
|
+
"Id": i.get("Id"),
|
|
117
|
+
"Record Type": i.get("RecordType"),
|
|
118
|
+
"Creation Time": i.get("CreationTime"),
|
|
119
|
+
"Operation": i.get("Operation"),
|
|
120
|
+
"Organization Id": i.get("OrganizationId"),
|
|
121
|
+
"User Type": i.get("UserType"),
|
|
122
|
+
"User Key": i.get("UserKey"),
|
|
123
|
+
"Workload": i.get("Workload"),
|
|
124
|
+
"Result Status": i.get("ResultStatus"),
|
|
125
|
+
"User Id": i.get("UserId"),
|
|
126
|
+
"Client IP": i.get("ClientIP"),
|
|
127
|
+
"User Agent": i.get("UserAgent"),
|
|
128
|
+
"Activity": i.get("Activity"),
|
|
129
|
+
"Workspace Name": i.get("WorkSpaceName"),
|
|
130
|
+
"Workspace Id": i.get("WorkspaceId"),
|
|
131
|
+
"Object Id": i.get("ObjectId"),
|
|
132
|
+
"Request Id": i.get("RequestId"),
|
|
133
|
+
"Object Type": i.get("ObjectType"),
|
|
134
|
+
"Object Display Name": i.get("ObjectDisplayName"),
|
|
135
|
+
"Experience": i.get("Experience"),
|
|
136
|
+
"Refresh Enforcement Policy": i.get("RefreshEnforcementPolicy"),
|
|
137
|
+
"Is Success": i.get("IsSuccess"),
|
|
138
|
+
"Activity Id": i.get("ActivityId"),
|
|
139
|
+
"Item Name": i.get("ItemName"),
|
|
140
|
+
"Dataset Name": i.get("DatasetName"),
|
|
141
|
+
"Report Name": i.get("ReportName"),
|
|
142
|
+
"Capacity Id": i.get("CapacityId"),
|
|
143
|
+
"Capacity Name": i.get("CapacityName"),
|
|
144
|
+
"App Name": i.get("AppName"),
|
|
145
|
+
"Dataset Id": i.get("DatasetId"),
|
|
146
|
+
"Report Id": i.get("ReportId"),
|
|
147
|
+
"Artifact Id": i.get("ArtifactId"),
|
|
148
|
+
"Artifact Name": i.get("ArtifactName"),
|
|
149
|
+
"Report Type": i.get("ReportType"),
|
|
150
|
+
"App Report Id": i.get("AppReportId"),
|
|
151
|
+
"Distribution Method": i.get("DistributionMethod"),
|
|
152
|
+
"Consumption Method": i.get("ConsumptionMethod"),
|
|
153
|
+
"Artifact Kind": i.get("ArtifactKind"),
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
else:
|
|
157
|
+
response_json["activityEventEntities"].extend(
|
|
158
|
+
r.get("activityEventEntities")
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
if return_dataframe:
|
|
162
|
+
if rows:
|
|
163
|
+
df = pd.DataFrame(rows, columns=list(columns.keys()))
|
|
164
|
+
_update_dataframe_datatypes(dataframe=df, column_map=columns)
|
|
165
|
+
return df
|
|
166
|
+
else:
|
|
167
|
+
return response_json
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from sempy_labs._helper_functions import (
|
|
4
|
+
_build_url,
|
|
5
|
+
_base_api,
|
|
6
|
+
_create_dataframe,
|
|
7
|
+
_update_dataframe_datatypes,
|
|
8
|
+
_is_valid_uuid,
|
|
9
|
+
)
|
|
10
|
+
from uuid import UUID
|
|
11
|
+
import sempy_labs._icons as icons
|
|
12
|
+
from sempy._utils._log import log
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@log
|
|
16
|
+
def list_apps(
|
|
17
|
+
top: Optional[int] = 1000,
|
|
18
|
+
skip: Optional[int] = None,
|
|
19
|
+
) -> pd.DataFrame:
|
|
20
|
+
"""
|
|
21
|
+
Shows a list of apps in the organization.
|
|
22
|
+
|
|
23
|
+
This is a wrapper function for the following API: `Admin - Apps GetAppsAsAdmin <https://learn.microsoft.com/rest/api/power-bi/admin/apps-get-apps-as-admin>`_.
|
|
24
|
+
|
|
25
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
26
|
+
|
|
27
|
+
Parameters
|
|
28
|
+
----------
|
|
29
|
+
top : int, default=1000
|
|
30
|
+
Returns only the first n results.
|
|
31
|
+
skip : int, default=None
|
|
32
|
+
Skips the first n results.
|
|
33
|
+
|
|
34
|
+
Returns
|
|
35
|
+
-------
|
|
36
|
+
pandas.DataFrame
|
|
37
|
+
A pandas dataframe showing a list of apps in the organization.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
columns = {
|
|
41
|
+
"App Name": "string",
|
|
42
|
+
"App Id": "string",
|
|
43
|
+
"Description": "string",
|
|
44
|
+
"Published By": "string",
|
|
45
|
+
"Last Update": "datetime_coerce",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
df = _create_dataframe(columns=columns)
|
|
49
|
+
|
|
50
|
+
params = {}
|
|
51
|
+
url = "/v1.0/myorg/admin/apps"
|
|
52
|
+
|
|
53
|
+
params["$top"] = top
|
|
54
|
+
|
|
55
|
+
if skip is not None:
|
|
56
|
+
params["$skip"] = skip
|
|
57
|
+
|
|
58
|
+
url = _build_url(url, params)
|
|
59
|
+
response = _base_api(request=url, client="fabric_sp")
|
|
60
|
+
|
|
61
|
+
rows = []
|
|
62
|
+
for v in response.json().get("value", []):
|
|
63
|
+
rows.append(
|
|
64
|
+
{
|
|
65
|
+
"App Name": v.get("name"),
|
|
66
|
+
"App Id": v.get("id"),
|
|
67
|
+
"Description": v.get("description"),
|
|
68
|
+
"Published By": v.get("publishedBy"),
|
|
69
|
+
"Last Update": v.get("lastUpdate"),
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
if rows:
|
|
74
|
+
df = pd.DataFrame(rows, columns=list(columns.keys()))
|
|
75
|
+
_update_dataframe_datatypes(dataframe=df, column_map=columns)
|
|
76
|
+
|
|
77
|
+
return df
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@log
|
|
81
|
+
def _resolve_app_id(app: str | UUID) -> str:
|
|
82
|
+
if _is_valid_uuid(app):
|
|
83
|
+
return app
|
|
84
|
+
else:
|
|
85
|
+
df = list_apps()
|
|
86
|
+
df_filt = df[df["App Name"] == app]
|
|
87
|
+
if df_filt.empty:
|
|
88
|
+
raise ValueError(f"{icons.red_dot} The '{app}' app does not exist.")
|
|
89
|
+
return df_filt["App Id"].iloc[0]
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@log
|
|
93
|
+
def list_app_users(app: str | UUID) -> pd.DataFrame:
|
|
94
|
+
"""
|
|
95
|
+
Shows a list of users that have access to the specified app.
|
|
96
|
+
|
|
97
|
+
This is a wrapper function for the following API: `Admin - Apps GetAppUsersAsAdmin <https://learn.microsoft.com/rest/api/power-bi/admin/apps-get-app-users-as-admin>`_.
|
|
98
|
+
|
|
99
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
100
|
+
|
|
101
|
+
Parameters
|
|
102
|
+
----------
|
|
103
|
+
app : str | uuid.UUID
|
|
104
|
+
The name or ID of the app.
|
|
105
|
+
|
|
106
|
+
Returns
|
|
107
|
+
-------
|
|
108
|
+
pandas.DataFrame
|
|
109
|
+
A pandas dataframe showing a list of users that have access to the specified app.
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
app_id = _resolve_app_id(app)
|
|
113
|
+
|
|
114
|
+
columns = {
|
|
115
|
+
"User Name": "string",
|
|
116
|
+
"Email Address": "string",
|
|
117
|
+
"App User Access Right": "string",
|
|
118
|
+
"Identifier": "string",
|
|
119
|
+
"Graph Id": "string",
|
|
120
|
+
"Principal Type": "string",
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
df = _create_dataframe(columns=columns)
|
|
124
|
+
|
|
125
|
+
url = f"/v1.0/myorg/admin/apps/{app_id}/users"
|
|
126
|
+
response = _base_api(request=url, client="fabric_sp")
|
|
127
|
+
|
|
128
|
+
rows = []
|
|
129
|
+
for v in response.json().get("value", []):
|
|
130
|
+
rows.append(
|
|
131
|
+
{
|
|
132
|
+
"User Name": v.get("displayName"),
|
|
133
|
+
"Email Address": v.get("emailAddress"),
|
|
134
|
+
"App User Access Right": v.get("appUserAccessRight"),
|
|
135
|
+
"Identifier": v.get("identifier"),
|
|
136
|
+
"Graph Id": v.get("graphId"),
|
|
137
|
+
"Principal Type": v.get("principalType"),
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
if rows:
|
|
142
|
+
df = pd.DataFrame(rows, columns=list(columns.keys()))
|
|
143
|
+
_update_dataframe_datatypes(dataframe=df, column_map=columns)
|
|
144
|
+
|
|
145
|
+
return df
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from sempy_labs._helper_functions import (
|
|
3
|
+
_base_api,
|
|
4
|
+
_create_dataframe,
|
|
5
|
+
_update_dataframe_datatypes,
|
|
6
|
+
)
|
|
7
|
+
from uuid import UUID
|
|
8
|
+
from typing import Optional
|
|
9
|
+
from sempy_labs.admin._basic_functions import _resolve_workspace_name_and_id
|
|
10
|
+
from sempy._utils._log import log
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@log
|
|
14
|
+
def list_unused_artifacts(workspace: Optional[str | UUID] = None) -> pd.DataFrame:
|
|
15
|
+
"""
|
|
16
|
+
Returns a list of datasets, reports, and dashboards that have not been used within 30 days for the specified workspace.
|
|
17
|
+
|
|
18
|
+
This is a wrapper function for the following API: `Admin - Groups GetUnusedArtifactsAsAdmin <https://learn.microsoft.com/rest/api/power-bi/admin/groups-get-unused-artifacts-as-admin>`_.
|
|
19
|
+
|
|
20
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
21
|
+
|
|
22
|
+
Returns
|
|
23
|
+
-------
|
|
24
|
+
pandas.DataFrame
|
|
25
|
+
A pandas dataframe showing a list of datasets, reports, and dashboards that have not been used within 30 days for the specified workspace.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
(_, workspace_id) = _resolve_workspace_name_and_id(workspace)
|
|
29
|
+
|
|
30
|
+
columns = {
|
|
31
|
+
"Artifact Name": "string",
|
|
32
|
+
"Artifact Id": "string",
|
|
33
|
+
"Artifact Type": "string",
|
|
34
|
+
"Artifact Size in MB": "string",
|
|
35
|
+
"Created Date Time": "datetime",
|
|
36
|
+
"Last Accessed Date Time": "datetime",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
df = _create_dataframe(columns=columns)
|
|
40
|
+
|
|
41
|
+
responses = _base_api(
|
|
42
|
+
request=f"/v1.0/myorg/admin/groups/{workspace_id}/unused",
|
|
43
|
+
client="fabric_sp",
|
|
44
|
+
uses_pagination=True,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
rows = []
|
|
48
|
+
for r in responses:
|
|
49
|
+
for i in r.get("unusedArtifactEntities", []):
|
|
50
|
+
rows.append(
|
|
51
|
+
{
|
|
52
|
+
"Artifact Name": i.get("displayName"),
|
|
53
|
+
"Artifact Id": i.get("artifactId"),
|
|
54
|
+
"Artifact Type": i.get("artifactType"),
|
|
55
|
+
"Artifact Size in MB": i.get("artifactSizeInMB"),
|
|
56
|
+
"Created Date Time": i.get("createdDateTime"),
|
|
57
|
+
"Last Accessed Date Time": i.get("lastAccessedDateTime"),
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
if rows:
|
|
62
|
+
df = pd.DataFrame(rows, columns=list(columns.keys()))
|
|
63
|
+
_update_dataframe_datatypes(dataframe=df, column_map=columns)
|
|
64
|
+
|
|
65
|
+
return df
|