Skip to content

Commit f3377c7

Browse files
authored
Merge pull request #607 from m-kovalsky/m-kovalsky/sempyfix
fix sempy
2 parents 0beabbb + 00eac51 commit f3377c7

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = 'semantic-link-labs'
1414
copyright = '2024, Microsoft and community'
1515
author = 'Microsoft and community'
16-
release = '0.9.8'
16+
release = '0.9.9'
1717

1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name="semantic-link-labs"
77
authors = [
88
{ name = "Microsoft Corporation" },
99
]
10-
version="0.9.8"
10+
version="0.9.9"
1111
description="Semantic Link Labs for Microsoft Fabric"
1212
readme="README.md"
1313
requires-python=">=3.10,<3.12"

src/sempy_labs/_helper_functions.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ def create_abfss_path(
6565
path = f"abfss://{lakehouse_workspace_id}@{fp}/{lakehouse_id}"
6666

6767
if delta_table_name is not None:
68+
path += "/Tables"
6869
if schema is not None:
69-
path += f"/{schema}"
70-
path += f"/Tables/{delta_table_name}"
70+
path += f"/{schema}/{delta_table_name}"
71+
else:
72+
path += f"/{delta_table_name}"
7173

7274
return path
7375

@@ -1739,19 +1741,23 @@ def _base_api(
17391741
lro_return_json: bool = False,
17401742
lro_return_status_code: bool = False,
17411743
):
1742-
1744+
import notebookutils
17431745
from sempy_labs._authentication import _get_headers
17441746

17451747
if (lro_return_json or lro_return_status_code) and status_codes is None:
17461748
status_codes = [200, 202]
17471749

1750+
def get_token(audience="pbi"):
1751+
return notebookutils.credentials.getToken(audience)
1752+
17481753
if isinstance(status_codes, int):
17491754
status_codes = [status_codes]
17501755

17511756
if client == "fabric":
1752-
c = fabric.FabricRestClient()
1757+
c = fabric.FabricRestClient(token_provider=get_token)
17531758
elif client == "fabric_sp":
1754-
c = fabric.FabricRestClient(token_provider=auth.token_provider.get())
1759+
token = auth.token_provider.get() or get_token
1760+
c = fabric.FabricRestClient(token_provider=token)
17551761
elif client in ["azure", "graph"]:
17561762
pass
17571763
else:

0 commit comments

Comments
 (0)