{"id":3801,"library":"semantic-link-labs","title":"Semantic Link Labs","description":"Semantic Link Labs is a Python library designed for use in Microsoft Fabric notebooks. It extends the capabilities of Semantic Link, offering additional functionalities to seamlessly integrate and work with semantic models, workspaces, lakehouses, reports, and capacities within Microsoft Fabric. The library is currently at version 0.14.2 and is actively developed.","status":"active","version":"0.14.2","language":"en","source_language":"en","source_url":"https://github.com/microsoft/semantic-link-labs","tags":["Microsoft Fabric","semantic link","Power BI","data science","notebooks"],"install":[{"cmd":"%pip install semantic-link-labs","lang":"bash","label":"Install in Fabric Notebook"}],"dependencies":[{"reason":"Core dependency for Semantic Link functionalities. semantic-link-labs utilizes public APIs from sempy.fabric.","package":"semantic-link-sempy","optional":false}],"imports":[{"note":"The common and recommended import alias is 'labs'.","wrong":"import semantic_link_labs","symbol":"labs","correct":"import sempy_labs as labs"},{"symbol":"migration","correct":"from sempy_labs import migration"},{"symbol":"directlake","correct":"from sempy_labs import directlake"},{"symbol":"lake","correct":"from sempy_labs import lakehouse as lake"},{"symbol":"rep","correct":"from sempy_labs import report as rep"},{"symbol":"connect_semantic_model","correct":"from sempy_labs.tom import connect_semantic_model"},{"symbol":"ConnectWarehouse","correct":"from sempy_labs import ConnectWarehouse"}],"quickstart":{"code":"import sempy_labs as labs\n\n# Example: List available workspaces (requires appropriate permissions in Fabric)\n# This is a placeholder; actual function calls require a Fabric context.\n# For a real scenario, you would typically be running this inside a Fabric notebook.\n# Example: List workspaces (assuming you have a Fabric connection/context)\n# workspaces = labs.admin.list_workspaces()\n# print(workspaces.head())\n\n# A more generic example demonstrating an import and a hypothetical utility call\nprint(\"Semantic Link Labs imported successfully. Ready to use 'labs' functions.\")\n# Placeholder for an actual function call from the library that doesn't require specific Fabric resources to run without error\n# As a generic example, we'll assume a 'hello' function exists for demonstration\n# In reality, you'd call a function related to Fabric resources, e.g., labs.admin.list_workspaces()\n","lang":"python","description":"The quickstart demonstrates importing the library and provides a placeholder for a common administrative task within Microsoft Fabric, such as listing workspaces. Running this code successfully typically requires execution within a Microsoft Fabric notebook with the necessary permissions and environment setup. The library handles authentication implicitly within the Fabric environment."},"warnings":[{"fix":"Report issues and request features via the GitHub repository. For critical production systems, evaluate the risk of using community-supported tools.","message":"Semantic Link Labs is not officially supported by Microsoft and is a community-driven extension. While it integrates with Microsoft Fabric, direct official support channels for this specific library are not available.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Include `%pip install semantic-link-labs` at the beginning of your Fabric notebooks or configure a custom Fabric environment to include the library.","message":"The library is not installed by default in Microsoft Fabric notebook runtimes. Users must explicitly run `%pip install semantic-link-labs` in each notebook session or install it into a custom Fabric environment.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure all necessary Fabric prerequisites are configured as per the official documentation to avoid runtime errors when using certain features.","message":"Several prerequisites must be met in your Microsoft Fabric capacity and workspace for full functionality, including enabled XMLA Read/Write, an existing lakehouse, and the 'Users can edit data models in the Power BI service' setting enabled in Workspace Settings.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the official documentation and GitHub README for clarity on the distinct roles and dependencies of each component, focusing on `sempy_labs` for extended features.","message":"The relationship between 'semantic-link', 'sempy', and 'semantic-link-labs' can be confusing. 'semantic-link' is the foundational feature, 'sempy' is a Python package within it, and 'semantic-link-labs' is an extension library built upon 'semantic-link-sempy' to provide additional, often experimental, functionalities.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}