{ "cells": [ { "cell_type": "markdown", "id": "5c27dfd1-4fe0-4a97-92e6-ddf78889aa93", "metadata": { "nteract": { "transient": { "deleting": false } } }, "source": [ "### Install the latest .whl package\n", "\n", "Check [here](https://pypi.org/project/semantic-link-labs/) to see the latest version." ] }, { "cell_type": "code", "execution_count": null, "id": "d5cae9db-cef9-48a8-a351-9c5fcc99645c", "metadata": { "jupyter": { "outputs_hidden": true, "source_hidden": false }, "nteract": { "transient": { "deleting": false } } }, "outputs": [], "source": [ "%pip install semantic-link-labs" ] }, { "cell_type": "markdown", "id": "b195eae8", "metadata": {}, "source": [ "### Import the library and set the initial parameters" ] }, { "cell_type": "code", "execution_count": null, "id": "1344e286", "metadata": {}, "outputs": [], "source": [ "import sempy_labs as labs\n", "dataset = '' # Enter your dataset name\n", "workspace = None # Enter your workspace name (if set to None it will use the workspace in which the notebook is running)" ] }, { "cell_type": "markdown", "id": "5a3fe6e8-b8aa-4447-812b-7931831e07fe", "metadata": { "nteract": { "transient": { "deleting": false } } }, "source": [ "### View [Query Scale Out](https://learn.microsoft.com/power-bi/enterprise/service-premium-scale-out) (QSO) settings" ] }, { "cell_type": "code", "execution_count": null, "id": "9e349954", "metadata": {}, "outputs": [], "source": [ "labs.list_qso_settings(dataset=dataset, workspace=workspace )" ] }, { "cell_type": "markdown", "id": "b0717cbb", "metadata": {}, "source": [ "### [Configure Query Scale Out](https://learn.microsoft.com/power-bi/enterprise/service-premium-scale-out-configure)\n", "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).\n", "\n", "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).\n" ] }, { "cell_type": "code", "execution_count": null, "id": "ec37dd14", "metadata": {}, "outputs": [], "source": [ "labs.set_qso(dataset=dataset, auto_sync=False, max_read_only_replicas=-1, workspace=workspace)" ] }, { "cell_type": "markdown", "id": "5d6beadd", "metadata": {}, "source": [ "### Sync Query Scale Out replicas" ] }, { "cell_type": "code", "execution_count": null, "id": "7ca10963", "metadata": {}, "outputs": [], "source": [ "labs.qso_sync(dataset=dataset, workspace=workspace)" ] }, { "cell_type": "markdown", "id": "719f428f", "metadata": {}, "source": [ "### Check Query Scale Out Sync Status" ] }, { "cell_type": "code", "execution_count": null, "id": "db6f197c", "metadata": {}, "outputs": [], "source": [ "dfA, dfB = labs.qso_sync_status(dataset=dataset, workspace=workspace)\n", "display(dfA)\n", "display(dfB)" ] }, { "cell_type": "markdown", "id": "e92cdf34", "metadata": {}, "source": [ "### Disable Query Scale Out" ] }, { "cell_type": "code", "execution_count": null, "id": "0624d649", "metadata": {}, "outputs": [], "source": [ "labs.disable_qso(dataset=dataset, workspace=workspace)" ] }, { "cell_type": "markdown", "id": "786d89bc", "metadata": {}, "source": [ "### Enable large semantic model format" ] }, { "cell_type": "code", "execution_count": null, "id": "d521b228", "metadata": {}, "outputs": [], "source": [ "labs.set_semantic_model_storage_format(dataset=dataset, storage_format='Large', workspace=workspace)" ] }, { "cell_type": "markdown", "id": "e90c20e9", "metadata": {}, "source": [ "### Disable large semantic model format" ] }, { "cell_type": "code", "execution_count": null, "id": "433220b2", "metadata": {}, "outputs": [], "source": [ "labs.set_semantic_model_storage_format(dataset=dataset, storage_format='Small', workspace=workspace)" ] } ], "metadata": { "kernel_info": { "name": "synapse_pyspark" }, "kernelspec": { "display_name": "Synapse PySpark", "language": "Python", "name": "synapse_pyspark" }, "language_info": { "name": "python" }, "microsoft": { "language": "python" }, "nteract": { "version": "nteract-front-end@1.0.0" }, "spark_compute": { "compute_id": "/trident/default" }, "synapse_widget": { "state": {}, "version": "0.1" }, "widgets": {} }, "nbformat": 4, "nbformat_minor": 5 }