semantic-link-labs 0.9.7__py3-none-any.whl → 0.9.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.
Potentially problematic release.
This version of semantic-link-labs might be problematic. Click here for more details.
- {semantic_link_labs-0.9.7.dist-info → semantic_link_labs-0.9.8.dist-info}/METADATA +3 -2
- {semantic_link_labs-0.9.7.dist-info → semantic_link_labs-0.9.8.dist-info}/RECORD +7 -7
- sempy_labs/_helper_functions.py +1 -108
- sempy_labs/tom/_model.py +3 -1
- {semantic_link_labs-0.9.7.dist-info → semantic_link_labs-0.9.8.dist-info}/WHEEL +0 -0
- {semantic_link_labs-0.9.7.dist-info → semantic_link_labs-0.9.8.dist-info}/licenses/LICENSE +0 -0
- {semantic_link_labs-0.9.7.dist-info → semantic_link_labs-0.9.8.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: semantic-link-labs
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.8
|
|
4
4
|
Summary: Semantic Link Labs for Microsoft Fabric
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License: MIT License
|
|
@@ -27,7 +27,7 @@ Dynamic: license-file
|
|
|
27
27
|
# Semantic Link Labs
|
|
28
28
|
|
|
29
29
|
[](https://badge.fury.io/py/semantic-link-labs)
|
|
30
|
-
[](https://readthedocs.org/projects/semantic-link-labs/)
|
|
31
31
|
[](https://github.com/psf/black)
|
|
32
32
|
[](https://pepy.tech/project/semantic-link-labs)
|
|
33
33
|
|
|
@@ -149,6 +149,7 @@ An even better way to ensure the semantic-link-labs library is available in your
|
|
|
149
149
|
2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
|
|
150
150
|
|
|
151
151
|
## Version History
|
|
152
|
+
* [0.9.8](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.8) (April 3, 2025)
|
|
152
153
|
* [0.9.7](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.7) (April 1, 2025)
|
|
153
154
|
* [0.9.6](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.6) (March 12, 2025)
|
|
154
155
|
* [0.9.5](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.5) (March 7, 2025)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
semantic_link_labs-0.9.
|
|
1
|
+
semantic_link_labs-0.9.8.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
2
2
|
sempy_labs/__init__.py,sha256=DCtHeonEHwZmNAmVJz_kX-a97d04NsenB-b8eK38Omo,15609
|
|
3
3
|
sempy_labs/_ai.py,sha256=BD1TdGOJ7T4m3x426OP-FLb7bevn-9gKY8BTEDAJDQU,16205
|
|
4
4
|
sempy_labs/_authentication.py,sha256=GjtN5XqIyWXbR5Ni4hfYiUNwgFa-ySX8e-BrqE1vgGc,6903
|
|
@@ -23,7 +23,7 @@ sempy_labs/_gateways.py,sha256=6JE6VeGFPKF617sf2mMkxXVOz57YHI5jAQLAF-BzRLc,17527
|
|
|
23
23
|
sempy_labs/_generate_semantic_model.py,sha256=5BRdobiNJ035HShCEpEkMPN-KfqVdqzGFuR0HM346mA,18560
|
|
24
24
|
sempy_labs/_git.py,sha256=RyaT4XzrSi-4NLJZWiWZnnNpMgrKzRNxhyY8b1O2I6c,17819
|
|
25
25
|
sempy_labs/_graphQL.py,sha256=truXeIUPRKLwc4skhs3FZYNcKP9FCGKly9en0YkR4NE,2690
|
|
26
|
-
sempy_labs/_helper_functions.py,sha256=
|
|
26
|
+
sempy_labs/_helper_functions.py,sha256=JTQi-kipEASjW7ggQtq3FK5xWXP6ohtjsr57TWzx2UM,62431
|
|
27
27
|
sempy_labs/_icons.py,sha256=SB9EQeoFCfD4bO6fcYuJOoPRSYenSrW0rI9G5RFsH28,3579
|
|
28
28
|
sempy_labs/_job_scheduler.py,sha256=_-Pifkttk1oPNxewxwWcQ4QC_Hr24GSi6nmrEXwc0pc,15814
|
|
29
29
|
sempy_labs/_kql_databases.py,sha256=0WVG9oiWgbjgV_oQc4f96QogqitVkbIeCmF_dVeePQE,4212
|
|
@@ -186,8 +186,8 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
|
|
|
186
186
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
|
|
187
187
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
|
|
188
188
|
sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
|
|
189
|
-
sempy_labs/tom/_model.py,sha256=
|
|
190
|
-
semantic_link_labs-0.9.
|
|
191
|
-
semantic_link_labs-0.9.
|
|
192
|
-
semantic_link_labs-0.9.
|
|
193
|
-
semantic_link_labs-0.9.
|
|
189
|
+
sempy_labs/tom/_model.py,sha256=zA94EUofE-VolEQWrDMt1aYSL744_CgU8V8NHvxKU08,194461
|
|
190
|
+
semantic_link_labs-0.9.8.dist-info/METADATA,sha256=E0QXudTlem6o1bjrPsv35Gxg_7BJo1oKzbsoi8R4yKM,26294
|
|
191
|
+
semantic_link_labs-0.9.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
192
|
+
semantic_link_labs-0.9.8.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
|
|
193
|
+
semantic_link_labs-0.9.8.dist-info/RECORD,,
|
sempy_labs/_helper_functions.py
CHANGED
|
@@ -392,7 +392,7 @@ def resolve_lakehouse_name_and_id(
|
|
|
392
392
|
lakehouse: Optional[str | UUID] = None, workspace: Optional[str | UUID] = None
|
|
393
393
|
) -> Tuple[str, UUID]:
|
|
394
394
|
|
|
395
|
-
|
|
395
|
+
workspace_id = resolve_workspace_id(workspace)
|
|
396
396
|
type = "Lakehouse"
|
|
397
397
|
|
|
398
398
|
if lakehouse is None:
|
|
@@ -896,113 +896,6 @@ def resolve_workspace_name_and_id(
|
|
|
896
896
|
return workspace_name, workspace_id
|
|
897
897
|
|
|
898
898
|
|
|
899
|
-
def resolve_item_id(
|
|
900
|
-
item: str | UUID, type: Optional[str] = None, workspace: Optional[str | UUID] = None
|
|
901
|
-
) -> UUID:
|
|
902
|
-
|
|
903
|
-
(workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
|
|
904
|
-
item_id = None
|
|
905
|
-
|
|
906
|
-
if _is_valid_uuid(item):
|
|
907
|
-
# Check (optional)
|
|
908
|
-
item_id = item
|
|
909
|
-
try:
|
|
910
|
-
_base_api(
|
|
911
|
-
request=f"/v1/workspaces/{workspace_id}/items/{item_id}",
|
|
912
|
-
client="fabric_sp",
|
|
913
|
-
)
|
|
914
|
-
except FabricHTTPException:
|
|
915
|
-
raise ValueError(
|
|
916
|
-
f"{icons.red_dot} The '{item_id}' item was not found in the '{workspace_name}' workspace."
|
|
917
|
-
)
|
|
918
|
-
else:
|
|
919
|
-
if type is None:
|
|
920
|
-
raise ValueError(
|
|
921
|
-
f"{icons.red_dot} The 'type' parameter is required if specifying an item name."
|
|
922
|
-
)
|
|
923
|
-
responses = _base_api(
|
|
924
|
-
request=f"/v1/workspaces/{workspace_id}/items?type={type}",
|
|
925
|
-
client="fabric_sp",
|
|
926
|
-
uses_pagination=True,
|
|
927
|
-
)
|
|
928
|
-
for r in responses:
|
|
929
|
-
for v in r.get("value", []):
|
|
930
|
-
display_name = v.get("displayName")
|
|
931
|
-
if display_name == item:
|
|
932
|
-
item_id = v.get("id")
|
|
933
|
-
break
|
|
934
|
-
|
|
935
|
-
if item_id is None:
|
|
936
|
-
raise ValueError(
|
|
937
|
-
f"{icons.red_dot} There's no item '{item}' of type '{type}' in the '{workspace_name}' workspace."
|
|
938
|
-
)
|
|
939
|
-
|
|
940
|
-
return item_id
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
def resolve_item_name_and_id(
|
|
944
|
-
item: str | UUID, type: Optional[str] = None, workspace: Optional[str | UUID] = None
|
|
945
|
-
) -> Tuple[str, UUID]:
|
|
946
|
-
|
|
947
|
-
workspace_id = resolve_workspace_id(workspace)
|
|
948
|
-
item_id = resolve_item_id(item=item, type=type, workspace=workspace_id)
|
|
949
|
-
item_name = (
|
|
950
|
-
_base_api(
|
|
951
|
-
request=f"/v1/workspaces/{workspace_id}/items/{item_id}", client="fabric_sp"
|
|
952
|
-
)
|
|
953
|
-
.json()
|
|
954
|
-
.get("displayName")
|
|
955
|
-
)
|
|
956
|
-
|
|
957
|
-
return item_name, item_id
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
def resolve_item_name(item_id: UUID, workspace: Optional[str | UUID] = None) -> str:
|
|
961
|
-
|
|
962
|
-
workspace_id = resolve_workspace_id(workspace)
|
|
963
|
-
try:
|
|
964
|
-
item_name = (
|
|
965
|
-
_base_api(
|
|
966
|
-
request=f"/v1/workspaces/{workspace_id}/items/{item_id}",
|
|
967
|
-
client="fabric_sp",
|
|
968
|
-
)
|
|
969
|
-
.json()
|
|
970
|
-
.get("displayName")
|
|
971
|
-
)
|
|
972
|
-
except FabricHTTPException:
|
|
973
|
-
raise ValueError(
|
|
974
|
-
f"{icons.red_dot} The '{item_id}' item was not found in the '{workspace_id}' workspace."
|
|
975
|
-
)
|
|
976
|
-
|
|
977
|
-
return item_name
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
def resolve_lakehouse_name_and_id(
|
|
981
|
-
lakehouse: Optional[str | UUID] = None, workspace: Optional[str | UUID] = None
|
|
982
|
-
) -> Tuple[str, UUID]:
|
|
983
|
-
|
|
984
|
-
(workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)
|
|
985
|
-
type = "Lakehouse"
|
|
986
|
-
|
|
987
|
-
if lakehouse is None:
|
|
988
|
-
lakehouse_id = fabric.get_lakehouse_id()
|
|
989
|
-
lakehouse_name = fabric.resolve_item_name(
|
|
990
|
-
item_id=lakehouse_id, type=type, workspace=workspace_id
|
|
991
|
-
)
|
|
992
|
-
elif _is_valid_uuid(lakehouse):
|
|
993
|
-
lakehouse_id = lakehouse
|
|
994
|
-
lakehouse_name = fabric.resolve_item_name(
|
|
995
|
-
item_id=lakehouse_id, type=type, workspace=workspace_id
|
|
996
|
-
)
|
|
997
|
-
else:
|
|
998
|
-
lakehouse_name = lakehouse
|
|
999
|
-
lakehouse_id = fabric.resolve_item_id(
|
|
1000
|
-
item_name=lakehouse, type=type, workspace=workspace_id
|
|
1001
|
-
)
|
|
1002
|
-
|
|
1003
|
-
return lakehouse_name, lakehouse_id
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
899
|
def _extract_json(dataframe: pd.DataFrame) -> dict:
|
|
1007
900
|
|
|
1008
901
|
payload = dataframe["payload"].iloc[0]
|
sempy_labs/tom/_model.py
CHANGED
|
@@ -5065,7 +5065,9 @@ class TOMWrapper:
|
|
|
5065
5065
|
# Remove the Direct Lake partition
|
|
5066
5066
|
self.remove_object(object=p)
|
|
5067
5067
|
|
|
5068
|
-
print(
|
|
5068
|
+
print(
|
|
5069
|
+
f"{icons.green_dot} The '{table_name}' table has been converted to Import mode."
|
|
5070
|
+
)
|
|
5069
5071
|
|
|
5070
5072
|
def close(self):
|
|
5071
5073
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|