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,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.1.0/schema.json",
|
|
3
|
+
"name": "ce8532a7e25020271077",
|
|
4
|
+
"position": {
|
|
5
|
+
"x": 10,
|
|
6
|
+
"y": 0,
|
|
7
|
+
"z": 0,
|
|
8
|
+
"height": 220,
|
|
9
|
+
"width": 280,
|
|
10
|
+
"tabOrder": 0
|
|
11
|
+
},
|
|
12
|
+
"visual": {
|
|
13
|
+
"visualType": "tableEx",
|
|
14
|
+
"query": {
|
|
15
|
+
"queryState": {
|
|
16
|
+
"Values": {
|
|
17
|
+
"projections": [
|
|
18
|
+
{
|
|
19
|
+
"field": {
|
|
20
|
+
"Column": {
|
|
21
|
+
"Expression": {
|
|
22
|
+
"SourceRef": {
|
|
23
|
+
"Entity": "BPAResults"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"Property": "Description"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"queryRef": "BPAResults.Description",
|
|
30
|
+
"nativeQueryRef": "Description"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"drillFilterOtherVisuals": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.0.0/schema.json",
|
|
3
|
+
"pageOrder": [
|
|
4
|
+
"01d72098bda5055bd500",
|
|
5
|
+
"c597da16dc7e63222a82",
|
|
6
|
+
"92735ae19b31712208ad",
|
|
7
|
+
"d37dce724a0ccc30044b"
|
|
8
|
+
],
|
|
9
|
+
"activePageName": "01d72098bda5055bd500"
|
|
10
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/1.1.0/schema.json",
|
|
3
|
+
"themeCollection": {
|
|
4
|
+
"baseTheme": {
|
|
5
|
+
"name": "CY24SU06",
|
|
6
|
+
"reportVersionAtImport": "5.56",
|
|
7
|
+
"type": "SharedResources"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"layoutOptimization": "None",
|
|
11
|
+
"filterConfig": {
|
|
12
|
+
"filters": [
|
|
13
|
+
{
|
|
14
|
+
"name": "5b2185023b97e36774cc",
|
|
15
|
+
"ordinal": 0,
|
|
16
|
+
"field": {
|
|
17
|
+
"Column": {
|
|
18
|
+
"Expression": {
|
|
19
|
+
"SourceRef": {
|
|
20
|
+
"Entity": "BPAResults"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"Property": "RunId"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"howCreated": "User",
|
|
27
|
+
"objects": {
|
|
28
|
+
"general": [
|
|
29
|
+
{
|
|
30
|
+
"properties": {}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "415731532a7ccb2104eb",
|
|
37
|
+
"ordinal": 1,
|
|
38
|
+
"field": {
|
|
39
|
+
"Column": {
|
|
40
|
+
"Expression": {
|
|
41
|
+
"SourceRef": {
|
|
42
|
+
"Entity": "BPAResults"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"Property": "Workspace"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"howCreated": "User"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "3f38df1aeb48209d5d17",
|
|
52
|
+
"ordinal": 2,
|
|
53
|
+
"field": {
|
|
54
|
+
"Column": {
|
|
55
|
+
"Expression": {
|
|
56
|
+
"SourceRef": {
|
|
57
|
+
"Entity": "BPAResults"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"Property": "Model"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"howCreated": "User"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "39a759a0bca91d4c0e20",
|
|
67
|
+
"ordinal": 3,
|
|
68
|
+
"field": {
|
|
69
|
+
"Column": {
|
|
70
|
+
"Expression": {
|
|
71
|
+
"SourceRef": {
|
|
72
|
+
"Entity": "BPAResults"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"Property": "Model Owner"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"howCreated": "User"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "2dd3fa2832177488d851",
|
|
82
|
+
"ordinal": 4,
|
|
83
|
+
"field": {
|
|
84
|
+
"Column": {
|
|
85
|
+
"Expression": {
|
|
86
|
+
"SourceRef": {
|
|
87
|
+
"Entity": "BPAResults"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"Property": "Category"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"howCreated": "User"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "5c24dae01050ee86d5d0",
|
|
97
|
+
"ordinal": 5,
|
|
98
|
+
"field": {
|
|
99
|
+
"Column": {
|
|
100
|
+
"Expression": {
|
|
101
|
+
"SourceRef": {
|
|
102
|
+
"Entity": "BPAResults"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"Property": "Severity"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"howCreated": "User"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "e7fda6595b95a0e13898",
|
|
112
|
+
"ordinal": 6,
|
|
113
|
+
"field": {
|
|
114
|
+
"Column": {
|
|
115
|
+
"Expression": {
|
|
116
|
+
"SourceRef": {
|
|
117
|
+
"Entity": "BPAResults"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"Property": "Rule Name"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"howCreated": "User"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"filterSortOrder": "Custom"
|
|
127
|
+
},
|
|
128
|
+
"objects": {
|
|
129
|
+
"section": [
|
|
130
|
+
{
|
|
131
|
+
"properties": {
|
|
132
|
+
"verticalAlignment": {
|
|
133
|
+
"expr": {
|
|
134
|
+
"Literal": {
|
|
135
|
+
"Value": "'Top'"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"outspacePane": [
|
|
143
|
+
{
|
|
144
|
+
"properties": {
|
|
145
|
+
"expanded": {
|
|
146
|
+
"expr": {
|
|
147
|
+
"Literal": {
|
|
148
|
+
"Value": "true"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"resourcePackages": [
|
|
157
|
+
{
|
|
158
|
+
"name": "SharedResources",
|
|
159
|
+
"type": "SharedResources",
|
|
160
|
+
"items": [
|
|
161
|
+
{
|
|
162
|
+
"name": "CY24SU06",
|
|
163
|
+
"path": "BaseThemes/CY24SU06.json",
|
|
164
|
+
"type": "BaseTheme"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"settings": {
|
|
170
|
+
"useStylableVisualContainerHeader": true,
|
|
171
|
+
"defaultDrillFilterOtherVisuals": true,
|
|
172
|
+
"allowChangeFilterTypes": true,
|
|
173
|
+
"useEnhancedTooltips": true,
|
|
174
|
+
"useDefaultAggregateDisplayName": true
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4.0",
|
|
3
|
+
"datasetReference": {
|
|
4
|
+
"byPath": null,
|
|
5
|
+
"byConnection": {
|
|
6
|
+
"connectionString": null,
|
|
7
|
+
"pbiServiceModelId": null,
|
|
8
|
+
"pbiModelVirtualServerName": "sobe_wowvirtualserver",
|
|
9
|
+
"pbiModelDatabaseName": null,
|
|
10
|
+
"name": null,
|
|
11
|
+
"connectionType": "pbiServiceXmlaStyleLive"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import sempy_labs._icons as icons
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from sempy_labs._helper_functions import (
|
|
4
|
+
resolve_workspace_name_and_id,
|
|
5
|
+
resolve_lakehouse_name_and_id,
|
|
6
|
+
_base_api,
|
|
7
|
+
resolve_item_id,
|
|
8
|
+
_mount,
|
|
9
|
+
resolve_workspace_name,
|
|
10
|
+
)
|
|
11
|
+
from sempy_labs.lakehouse._lakehouse import lakehouse_attached
|
|
12
|
+
from uuid import UUID
|
|
13
|
+
from sempy._utils._log import log
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@log
|
|
17
|
+
def download_report(
|
|
18
|
+
report: str | UUID,
|
|
19
|
+
file_name: Optional[str] = None,
|
|
20
|
+
download_type: str = "LiveConnect",
|
|
21
|
+
workspace: Optional[str | UUID] = None,
|
|
22
|
+
):
|
|
23
|
+
"""
|
|
24
|
+
Downloads the specified report from the specified workspace to a Power BI .pbix file.
|
|
25
|
+
|
|
26
|
+
This is a wrapper function for the following API: `Reports - Export Report In Group <https://learn.microsoft.com/rest/api/power-bi/reports/export-report-in-group>`_.
|
|
27
|
+
|
|
28
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
29
|
+
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
report: str | uuid.UUID
|
|
33
|
+
Name or ID of the report.
|
|
34
|
+
file_name : str, default=None
|
|
35
|
+
Name of the .pbix file to be saved.
|
|
36
|
+
Defaults to None which resolves to the name of the report.
|
|
37
|
+
download_type : str, default="LiveConnect"
|
|
38
|
+
The type of download. Valid values are "LiveConnect" and "IncludeModel".
|
|
39
|
+
workspace : str | uuid.UUID, default=None
|
|
40
|
+
The Fabric workspace name or ID.
|
|
41
|
+
Defaults to None which resolves to the workspace of the attached lakehouse
|
|
42
|
+
or if no lakehouse attached, resolves to the workspace of the notebook.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
if not lakehouse_attached():
|
|
46
|
+
raise ValueError(
|
|
47
|
+
f"{icons.red_dot} A lakehouse must be attached to the notebook."
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
(workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
|
|
51
|
+
(lakehouse_name, lakehouse_id) = resolve_lakehouse_name_and_id()
|
|
52
|
+
lakehouse_workspace = resolve_workspace_name()
|
|
53
|
+
|
|
54
|
+
download_types = ["LiveConnect", "IncludeModel"]
|
|
55
|
+
if download_type not in download_types:
|
|
56
|
+
raise ValueError(
|
|
57
|
+
f"{icons.red_dot} Invalid download_type parameter. Valid options: {download_types}."
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
file_name = file_name or report
|
|
61
|
+
report_id = resolve_item_id(item=report, type="Report", workspace=workspace)
|
|
62
|
+
|
|
63
|
+
response = _base_api(
|
|
64
|
+
request=f"v1.0/myorg/groups/{workspace_id}/reports/{report_id}/Export?downloadType={download_type}",
|
|
65
|
+
client="fabric_sp",
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# Save file to the attached lakehouse
|
|
69
|
+
local_path = _mount()
|
|
70
|
+
save_file = f"{local_path}/Files/{file_name}.pbix"
|
|
71
|
+
with open(save_file, "wb") as file:
|
|
72
|
+
file.write(response.content)
|
|
73
|
+
|
|
74
|
+
print(
|
|
75
|
+
f"{icons.green_dot} The '{report}' report within the '{workspace_name}' workspace has been exported as the '{file_name}' file in the '{lakehouse_name}' lakehouse within the '{lakehouse_workspace}' workspace."
|
|
76
|
+
)
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import sempy.fabric as fabric
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
import time
|
|
5
|
+
from sempy_labs._helper_functions import (
|
|
6
|
+
generate_embedded_filter,
|
|
7
|
+
resolve_workspace_name_and_id,
|
|
8
|
+
_base_api,
|
|
9
|
+
_mount,
|
|
10
|
+
)
|
|
11
|
+
from typing import Optional
|
|
12
|
+
from sempy._utils._log import log
|
|
13
|
+
import sempy_labs._icons as icons
|
|
14
|
+
from uuid import UUID
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@log
|
|
18
|
+
def export_report(
|
|
19
|
+
report: str,
|
|
20
|
+
export_format: str,
|
|
21
|
+
file_name: Optional[str] = None,
|
|
22
|
+
bookmark_name: Optional[str] = None,
|
|
23
|
+
page_name: Optional[str] = None,
|
|
24
|
+
visual_name: Optional[str] = None,
|
|
25
|
+
report_filter: Optional[str] = None,
|
|
26
|
+
workspace: Optional[str | UUID] = None,
|
|
27
|
+
lakehouse: Optional[str | UUID] = None,
|
|
28
|
+
lakehouse_workspace: Optional[str | UUID] = None,
|
|
29
|
+
):
|
|
30
|
+
"""
|
|
31
|
+
Exports a Power BI report to a file in your lakehouse.
|
|
32
|
+
|
|
33
|
+
This is a wrapper function for the following APIs: `Reports - Export To File In Group <https://learn.microsoft.com/rest/api/power-bi/reports/export-to-file-in-group>`_, `Reports - Get Export To File Status In Group <https://learn.microsoft.com/rest/api/power-bi/reports/get-export-to-file-status-in-group>`_, `Reports - Get File Of Export To File In Group <https://learn.microsoft.com/rest/api/power-bi/reports/get-file-of-export-to-file-in-group>`_.
|
|
34
|
+
|
|
35
|
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
report : str
|
|
40
|
+
Name of the Power BI report.
|
|
41
|
+
export_format : str
|
|
42
|
+
The format in which to export the report. For image formats, enter the file extension in this parameter, not 'IMAGE'.
|
|
43
|
+
`Valid formats <https://learn.microsoft.com/rest/api/power-bi/reports/export-to-file-in-group#fileformat>`_
|
|
44
|
+
file_name : str, default=None
|
|
45
|
+
The name of the file to be saved within the lakehouse. Do not include the file extension. Defaults ot the reportName parameter value.
|
|
46
|
+
bookmark_name : str, default=None
|
|
47
|
+
The name (GUID) of a bookmark within the report.
|
|
48
|
+
page_name : str, default=None
|
|
49
|
+
The name (GUID) of the report page.
|
|
50
|
+
visual_name : str, default=None
|
|
51
|
+
The name (GUID) of a visual. If you specify this parameter you must also specify the page_name parameter.
|
|
52
|
+
report_filter : str, default=None
|
|
53
|
+
A report filter to be applied when exporting the report. Syntax is user-friendly. See above for examples.
|
|
54
|
+
workspace : str | uuid.UUID, default=None
|
|
55
|
+
The Fabric workspace name or ID.
|
|
56
|
+
Defaults to None which resolves to the workspace of the attached lakehouse
|
|
57
|
+
or if no lakehouse attached, resolves to the workspace of the notebook.
|
|
58
|
+
lakehouse : str | uuid.UUID, default=None
|
|
59
|
+
The Fabric lakehouse name or ID. This will be the lakehouse to which the export of the report is saved.
|
|
60
|
+
Defaults to None which resolves to the lakehouse attached to the notebook.
|
|
61
|
+
lakehouse_workspace : str | uuid.UUID, default=None
|
|
62
|
+
The Fabric workspace name or ID used by the lakehouse.
|
|
63
|
+
Defaults to None which resolves to the workspace of the attached lakehouse
|
|
64
|
+
or if no lakehouse attached, resolves to the workspace of the notebook.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
(workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
|
|
68
|
+
|
|
69
|
+
if isinstance(page_name, str):
|
|
70
|
+
page_name = [page_name]
|
|
71
|
+
if isinstance(visual_name, str):
|
|
72
|
+
visual_name = [visual_name]
|
|
73
|
+
|
|
74
|
+
if bookmark_name is not None and (page_name is not None or visual_name is not None):
|
|
75
|
+
raise ValueError(
|
|
76
|
+
f"{icons.red_dot} If the 'bookmark_name' parameter is set, the 'page_name' and 'visual_name' parameters must not be set."
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
if visual_name is not None and page_name is None:
|
|
80
|
+
raise ValueError(
|
|
81
|
+
f"{icons.red_dot} If the 'visual_name' parameter is set, the 'page_name' parameter must be set."
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
valid_formats = {
|
|
85
|
+
"ACCESSIBLEPDF": ".pdf",
|
|
86
|
+
"CSV": ".csv",
|
|
87
|
+
"DOCX": ".docx",
|
|
88
|
+
"MHTML": ".mhtml",
|
|
89
|
+
"PDF": ".pdf",
|
|
90
|
+
"PNG": ".png",
|
|
91
|
+
"PPTX": ".pptx",
|
|
92
|
+
"XLSX": ".xlsx",
|
|
93
|
+
"XML": ".xml",
|
|
94
|
+
"BMP": ".bmp",
|
|
95
|
+
"EMF": ".emf",
|
|
96
|
+
"GIF": ".gif",
|
|
97
|
+
"JPEG": ".jpeg",
|
|
98
|
+
"TIFF": ".tiff",
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export_format = export_format.upper()
|
|
102
|
+
file_ext = valid_formats.get(export_format)
|
|
103
|
+
if file_ext is None:
|
|
104
|
+
raise ValueError(
|
|
105
|
+
f"{icons.red_dot} The '{export_format}' format is not a valid format for exporting Power BI reports. Please enter a valid format. Options: {valid_formats}"
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
if file_name is None:
|
|
109
|
+
file_name = f"{report}{file_ext}"
|
|
110
|
+
else:
|
|
111
|
+
file_name = f"{file_name}{file_ext}"
|
|
112
|
+
|
|
113
|
+
dfI = fabric.list_items(workspace=workspace)
|
|
114
|
+
dfI_filt = dfI[
|
|
115
|
+
(dfI["Type"].isin(["Report", "PaginatedReport"]))
|
|
116
|
+
& (dfI["Display Name"] == report)
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
if dfI_filt.empty:
|
|
120
|
+
raise ValueError(
|
|
121
|
+
f"{icons.red_dot} The '{report}' report does not exist in the '{workspace_name}' workspace."
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
report_type = dfI_filt["Type"].iloc[0]
|
|
125
|
+
|
|
126
|
+
# Limitations
|
|
127
|
+
pbiOnly = ["PNG"]
|
|
128
|
+
paginatedOnly = [
|
|
129
|
+
"ACCESSIBLEPDF",
|
|
130
|
+
"CSV",
|
|
131
|
+
"DOCX",
|
|
132
|
+
"BMP",
|
|
133
|
+
"EMF",
|
|
134
|
+
"GIF",
|
|
135
|
+
"JPEG",
|
|
136
|
+
"TIFF",
|
|
137
|
+
"MHTML",
|
|
138
|
+
"XLSX",
|
|
139
|
+
"XML",
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
if report_type == "Report" and export_format in paginatedOnly:
|
|
143
|
+
raise ValueError(
|
|
144
|
+
f"{icons.red_dot} The '{export_format}' format is only supported for paginated reports."
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
if report_type == "PaginatedReport" and export_format in pbiOnly:
|
|
148
|
+
raise ValueError(
|
|
149
|
+
f"{icons.red_dot} The '{export_format}' format is only supported for Power BI reports."
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
if report_type == "PaginatedReport" and (
|
|
153
|
+
bookmark_name is not None or page_name is not None or visual_name is not None
|
|
154
|
+
):
|
|
155
|
+
raise ValueError(
|
|
156
|
+
f"{icons.red_dot} Export for paginated reports does not support bookmarks/pages/visuals. Those parameters must not be set for paginated reports."
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
reportId = dfI_filt["Id"].iloc[0]
|
|
160
|
+
|
|
161
|
+
if (
|
|
162
|
+
export_format in ["BMP", "EMF", "GIF", "JPEG", "TIFF"]
|
|
163
|
+
and report_type == "PaginatedReport"
|
|
164
|
+
):
|
|
165
|
+
request_body = {
|
|
166
|
+
"format": "IMAGE",
|
|
167
|
+
"paginatedReportConfiguration": {
|
|
168
|
+
"formatSettings": {"OutputFormat": export_format.lower()}
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
elif bookmark_name is None and page_name is None and visual_name is None:
|
|
172
|
+
request_body = {"format": export_format}
|
|
173
|
+
elif bookmark_name is not None:
|
|
174
|
+
if report_type == "Report":
|
|
175
|
+
request_body = {
|
|
176
|
+
"format": export_format,
|
|
177
|
+
"powerBIReportConfiguration": {
|
|
178
|
+
"defaultBookmark": {"name": bookmark_name}
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
elif page_name is not None and visual_name is None:
|
|
182
|
+
if report_type == "Report":
|
|
183
|
+
request_body = {"format": export_format, "powerBIReportConfiguration": {}}
|
|
184
|
+
|
|
185
|
+
request_body["powerBIReportConfiguration"]["pages"] = []
|
|
186
|
+
for page in page_name:
|
|
187
|
+
page_dict = {"pageName": page}
|
|
188
|
+
request_body["powerBIReportConfiguration"]["pages"].append(page_dict)
|
|
189
|
+
|
|
190
|
+
elif page_name is not None and visual_name is not None:
|
|
191
|
+
if len(page_name) != len(visual_name):
|
|
192
|
+
raise ValueError(
|
|
193
|
+
f"{icons.red_dot} Each 'visual_name' must map to a single 'page_name'."
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
if report_type == "Report":
|
|
197
|
+
request_body = {"format": export_format, "powerBIReportConfiguration": {}}
|
|
198
|
+
|
|
199
|
+
request_body["powerBIReportConfiguration"]["pages"] = []
|
|
200
|
+
a = 0
|
|
201
|
+
for page in page_name:
|
|
202
|
+
visual = visual_name[a]
|
|
203
|
+
page_dict = {"pageName": page, "visualName": visual}
|
|
204
|
+
request_body["powerBIReportConfiguration"]["pages"].append(page_dict)
|
|
205
|
+
a += 1
|
|
206
|
+
|
|
207
|
+
# Transform and add report filter if it is specified
|
|
208
|
+
if report_filter is not None and report_type == "Report":
|
|
209
|
+
reportFilter = generate_embedded_filter(filter=report_filter)
|
|
210
|
+
report_level_filter = {"filter": reportFilter}
|
|
211
|
+
|
|
212
|
+
if "powerBIReportConfiguration" not in request_body:
|
|
213
|
+
request_body["powerBIReportConfiguration"] = {}
|
|
214
|
+
request_body["powerBIReportConfiguration"]["reportLevelFilters"] = [
|
|
215
|
+
report_level_filter
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
base_url = f"/v1.0/myorg/groups/{workspace_id}/reports/{reportId}"
|
|
219
|
+
response = _base_api(
|
|
220
|
+
request=f"{base_url}/ExportTo",
|
|
221
|
+
method="post",
|
|
222
|
+
payload=request_body,
|
|
223
|
+
status_codes=202,
|
|
224
|
+
client="fabric_sp",
|
|
225
|
+
)
|
|
226
|
+
export_id = json.loads(response.content).get("id")
|
|
227
|
+
|
|
228
|
+
get_status_url = f"{base_url}/exports/{export_id}"
|
|
229
|
+
response = _base_api(
|
|
230
|
+
request=get_status_url, status_codes=[200, 202], client="fabric_sp"
|
|
231
|
+
)
|
|
232
|
+
response_body = json.loads(response.content)
|
|
233
|
+
while response_body["status"] not in ["Succeeded", "Failed"]:
|
|
234
|
+
time.sleep(3)
|
|
235
|
+
response = _base_api(
|
|
236
|
+
request=get_status_url, status_codes=[200, 202], client="fabric_sp"
|
|
237
|
+
)
|
|
238
|
+
response_body = json.loads(response.content)
|
|
239
|
+
if response_body["status"] == "Failed":
|
|
240
|
+
raise ValueError(
|
|
241
|
+
f"{icons.red_dot} The export for the '{report}' report within the '{workspace_name}' workspace in the '{export_format}' format has failed."
|
|
242
|
+
)
|
|
243
|
+
else:
|
|
244
|
+
response = _base_api(request=f"{get_status_url}/file", client="fabric_sp")
|
|
245
|
+
print(
|
|
246
|
+
f"{icons.in_progress} Saving the '{export_format}' export for the '{report}' report within the '{workspace_name}' workspace to the lakehouse..."
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
local_path = _mount(lakehouse=lakehouse, workspace=lakehouse_workspace)
|
|
250
|
+
folder_path = f"{local_path}/Files"
|
|
251
|
+
file_path = os.path.join(folder_path, file_name)
|
|
252
|
+
|
|
253
|
+
with open(file_path, "wb") as export_file:
|
|
254
|
+
export_file.write(response.content)
|
|
255
|
+
print(
|
|
256
|
+
f"{icons.green_dot} The '{export_format}' export for the '{report}' report within the '{workspace_name}' workspace has been saved '{file_name}' in the '{lakehouse}' within the '{lakehouse_workspace}' workspace."
|
|
257
|
+
)
|