Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made small fixes #61

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sempy_labs/_generate_semantic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ def get_semantic_model_bim(
)

lakehouse_id = fabric.get_lakehouse_id()
lakehouse = resolve_lakehouse_name(lakehouse_id, lakehouse_workspace)
lake_workspace = fabric.resolve_workspace_name()
lakehouse = resolve_lakehouse_name(lakehouse_id, lake_workspace)
folderPath = "/lakehouse/default/Files"
fileExt = ".bim"
if not save_to_file_name.endswith(fileExt):
Expand Down
6 changes: 6 additions & 0 deletions src/sempy_labs/_list_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2452,6 +2452,12 @@ def import_notebook_from_web(
f"{icons.red_dot} The '{notebook_name}' already exists within the '{workspace}' workspace."
)

# Fix links to go to the raw github file
starting_text = "https://github.com/"
starting_text_len = len(starting_text)
if url.startswith(starting_text):
url = f"https://raw.githubusercontent.com/{url[starting_text_len:]}".replace('/blob/', '/')

response = requests.get(url)
if response.status_code != 200:
raise FabricHTTPException(response)
Expand Down
10 changes: 2 additions & 8 deletions src/sempy_labs/report/_report_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,8 @@ def get_report_json(
)

lakehouse_id = fabric.get_lakehouse_id()
for mp in mssparkutils.fs.mounts():
if mp.mountPoint == "/default" and mp.storageType == "Lakehouse":
ind = mp.source.index("@")
lakehouse_workspace_id = mp.source[8:ind]
lakehouse_workspace = fabric.resolve_workspace_name(
lakehouse_workspace_id
)
lakehouse = resolve_lakehouse_name(lakehouse_id, lakehouse_workspace)
lake_workspace = fabric.resolve_workspace_name()
lakehouse = resolve_lakehouse_name(lakehouse_id, lake_workspace)
folderPath = "/lakehouse/default/Files"
fileExt = ".json"
if not save_to_file_name.endswith(fileExt):
Expand Down
Loading