Skip to content

Commit

Permalink
fix for storage mode (#105)
Browse files Browse the repository at this point in the history
* fix for storage mode

* updated to 0.7.2
  • Loading branch information
m-kovalsky authored Aug 30, 2024
1 parent ca5c827 commit c1d1db2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Semantic Link Labs

[![PyPI version](https://badge.fury.io/py/semantic-link-labs.svg)](https://badge.fury.io/py/semantic-link-labs)
[![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.7.1&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
[![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.7.2&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
project = 'semantic-link-labs'
copyright = '2024, Microsoft and community'
author = 'Microsoft and community'
release = '0.7.1'
release = '0.7.2'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name="semantic-link-labs"
authors = [
{ name = "Microsoft Corporation" },
]
version="0.7.1"
version="0.7.2"
description="Semantic Link Labs for Microsoft Fabric"
readme="README.md"
requires-python=">=3.10,<3.12"
Expand Down
18 changes: 15 additions & 3 deletions src/sempy_labs/_query_scale_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,18 @@ def set_qso(
A pandas dataframe showing the current query scale-out settings.
"""

from sempy_labs._helper_functions import is_default_semantic_model

# https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-dataset-in-group

(workspace, workspace_id) = resolve_workspace_name_and_id(workspace)
dataset_id = resolve_dataset_id(dataset, workspace)

if is_default_semantic_model(dataset=dataset, workspace=workspace):
raise ValueError(
f"{icons.red_dot} The 'set_qso' function does not run against default semantic models."
)

if max_read_only_replicas == 0:
disable_qso(dataset=dataset, workspace=workspace)
return
Expand All @@ -223,9 +230,14 @@ def set_qso(
}
}

set_semantic_model_storage_format(
dataset=dataset, storage_format="Large", workspace=workspace
)
dfL = list_qso_settings(dataset=dataset, workspace=workspace)
storage_mode = dfL["Storage Mode"].iloc[0]

if storage_mode == "Small":
set_semantic_model_storage_format(
dataset=dataset, storage_format="Large", workspace=workspace
)

client = fabric.PowerBIRestClient()
response = client.patch(
f"/v1.0/myorg/groups/{workspace_id}/datasets/{dataset_id}",
Expand Down

0 comments on commit c1d1db2

Please sign in to comment.