{ "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": "cd8de5a0", "metadata": {}, "source": [ "### Import the library" ] }, { "cell_type": "code", "execution_count": null, "id": "5cc6eedf", "metadata": {}, "outputs": [], "source": [ "import sempy_labs as labs\n", "from sempy_labs import lakehouse as lake\n", "from sempy_labs import directlake\n", "import sempy_labs.report as rep\n", "\n", "dataset_name = ''\n", "workspace_name = None" ] }, { "cell_type": "markdown", "id": "5a3fe6e8-b8aa-4447-812b-7931831e07fe", "metadata": { "nteract": { "transient": { "deleting": false } } }, "source": [ "### Vertipaq Analyzer \n", "\n", "[](https://www.youtube.com/watch?v=RnrwUqg2-VI)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "cde43b47-4ecc-46ae-9125-9674819c7eab", "metadata": { "jupyter": { "outputs_hidden": false, "source_hidden": false }, "nteract": { "transient": { "deleting": false } } }, "outputs": [], "source": [ "labs.vertipaq_analyzer(dataset=dataset_name, workspace=workspace_name)" ] }, { "cell_type": "markdown", "id": "419a348f", "metadata": {}, "source": [ "Export the Vertipaq Analyzer results to a .zip file in your lakehouse" ] }, { "cell_type": "code", "execution_count": null, "id": "8aa239b3", "metadata": {}, "outputs": [], "source": [ "labs.vertipaq_analyzer(dataset=dataset_name, workspace=workspace_name, export='zip')" ] }, { "cell_type": "markdown", "id": "2dce0f4f", "metadata": {}, "source": [ "Export the Vertipaq Analyzer results to append to delta tables in your lakehouse." ] }, { "cell_type": "code", "execution_count": null, "id": "aef93fc8", "metadata": {}, "outputs": [], "source": [ "labs.vertipaq_analyzer(dataset=dataset_name, workspace=workspace_name, export='table')" ] }, { "cell_type": "markdown", "id": "1c62a802", "metadata": {}, "source": [ "Visualize the contents of an exported Vertipaq Analzyer .zip file." ] }, { "cell_type": "code", "execution_count": null, "id": "9e349954", "metadata": {}, "outputs": [], "source": [ "labs.import_vertipaq_analyzer(folder_path='', file_name='')" ] }, { "cell_type": "markdown", "id": "456ce0ff", "metadata": {}, "source": [ "### Best Practice Analzyer\n", "\n", "[](https://www.youtube.com/watch?v=095avwDn4Hk)\n", "\n", "This runs the [standard rules](https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules) for semantic models posted on Microsoft's GitHub." ] }, { "cell_type": "code", "execution_count": null, "id": "0a3616b5-566e-414e-a225-fb850d6418dc", "metadata": { "jupyter": { "outputs_hidden": false, "source_hidden": false }, "nteract": { "transient": { "deleting": false } } }, "outputs": [], "source": [ "labs.run_model_bpa(dataset=dataset_name, workspace=workspace_name)" ] }, { "cell_type": "markdown", "id": "6fb32a58", "metadata": {}, "source": [ "This runs the Best Practice Analyzer and exports the results to the 'modelbparesults' delta table in your Fabric lakehouse." ] }, { "cell_type": "code", "execution_count": null, "id": "677851c3", "metadata": {}, "outputs": [], "source": [ "labs.run_model_bpa(dataset=dataset_name, workspace=workspace_name, export=True)" ] }, { "cell_type": "markdown", "id": "64968a31", "metadata": {}, "source": [ "This runs the Best Practice Analyzer with the rules translated into Italian (can enter any language in the 'language' parameter)." ] }, { "cell_type": "code", "execution_count": null, "id": "3c7d89e2", "metadata": {}, "outputs": [], "source": [ "labs.run_model_bpa(dataset=dataset_name, workspace=workspace_name, language='italian')" ] }, { "cell_type": "markdown", "id": "255c30bb", "metadata": {}, "source": [ "