Query Scale Out

Microsoft Employee
38 Views
mikova
Microsoft Employee
Microsoft Employee

Query Scale Out

Download this notebook from: semantic-link-labs/notebooks/Query Scale Out.ipynb at main · microsoft/semantic-link-labs · GitHub

 

Install the latest .whl package

Check here to see the latest version.

%pip install semantic-link-labs

Import the library and set the initial parameters

import sempy_labs as labs
dataset = '' # Enter your dataset name
workspace = None # Enter your workspace name (if set to None it will use the workspace in which the notebook is running)

View Query Scale Out (QSO) settings

labs.list_qso_settings(dataset=dataset, workspace=workspace )

Configure Query Scale Out

Setting 'auto_sync' to True will ensure that the semantic model automatically syncs read-only replicas. Setting this to False will necessitate syncing the replicas (i.e. via the qso_sync function).

The 'max_read_only_replicas' is the maximum number of read-only replicas for the semantic model (0-64, -1 for automatic number of replicas).

labs.set_qso(dataset=dataset, auto_sync=False, max_read_only_replicas=-1, workspace=workspace)

Sync Query Scale Out replicas

labs.qso_sync(dataset=dataset, workspace=workspace)

Check Query Scale Out Sync Status

dfA, dfB = labs.qso_sync_status(dataset=dataset, workspace=workspace)
display(dfA)
display(dfB)

Disable Query Scale Out

labs.disable_qso(dataset=dataset, workspace=workspace)

Enable large semantic model format

labs.set_semantic_model_storage_format(dataset=dataset, storage_format='Large', workspace=workspace)

Disable large semantic model format

labs.set_semantic_model_storage_format(dataset=dataset, storage_format='Small', workspace=workspace)

 

 

 

avatar user