Forum Discussion

Charline_74's avatar
Charline_74
Icon for Resolver I rankResolver I
25 days ago
Solved

Sempy Labs + Azure DevOps

Do you know if it's possible to run a Sempy Labs module via Azure DevOps—for example, as an action in an Azure DevOps pipeline? If so, do you know how? Do you have any examples?

Thanks in Advance, 

Charline BONIER

  • v-abhinavmu's avatar
    v-abhinavmu
    20 days ago

    Hi Charline_74​,

    Thanks for reaching out to the Microsoft Fabric Community forum. and thanks to ShivekMaharaj​ for sharing valuable insights.

    Yes. If you retrieve the workspace name from Azure DevOps, you can pass that value to a Fabric notebook when triggering it through the Fabric REST API.

    The Run On Demand Notebook API supports per-run parameters, including text parameters, which can be used to provide values to the notebook at execution time.

    In the notebook, you can designate a parameter cell so that values supplied during execution can overwrite the default values.

    Therefore, the approach could be:
    Azure DevOps -> retrieve workspace name -> call the Fabric Notebook API -> pass the workspace name as a parameter

    The API also supports service principals and managed identities for unattended execution.

    For more details, please refer to the below Official Microsoft Documentation:
    Background Jobs - Run On Demand Notebook - REST API (Notebook) | Microsoft Learn
    Develop, execute, and manage notebooks - Microsoft Fabric | Microsoft Learn

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.

4 Replies

  • Kagiyama_yutaka's avatar
    Kagiyama_yutaka
    Icon for Continued Contributor rankContinued Contributor

    In DevOps u just drop a Python step, run pip install sempy-labs, then call ur .py. If the agent picks the wrong python, set UsePythonVersion and it behaves. That’s all.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Resident Rockstar rankResident Rockstar

    Hi Charline_74​,

    Yes, Azure DevOps can orchestrate Semantic Link Labs, but I would make one distinction.

    You can install the semantic-link-labs Python package directly on an Azure DevOps agent, but the library is primarily designed for use inside Fabric notebooks, and not every function is guaranteed to work headlessly outside Fabric because some rely on Fabric context or authentication.

    For CI/CD, I would normally keep the Semantic Link Labs code in a Fabric notebook and trigger that notebook from Azure DevOps.

    Microsoft now supports running Fabric notebooks through the public API, including execution with a service principal or managed identity.

    So the pattern would be:

    Azure DevOps -> Fabric notebook API -> notebook -> semantic-link-labs

    That gives you a cleaner execution environment and avoids having to reproduce Fabric notebook context on the DevOps agent.

    If you do want to execute the Python directly on the agent, the package is:

    pip install semantic-link-labs

    Semantic Link Labs also supports service principal authentication for functions whose underlying APIs support it, so whether direct execution works depends on the specific module/function you want to call.

    If you share which Semantic Link Labs function you want to automate, I can probably narrow down which of the two approaches fits better.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

    • Charline_74's avatar
      Charline_74
      Icon for Resolver I rankResolver I

      Hi ShivekMaharaj​ 

      Thank you for your feedback. Do you know if it's possible to retrieve data from Azure DevOps to a notebook? For example, I retrieve the name of a workspace from Azure DevOps via a Fabric API—can I pass that name to a notebook in Fabric?

      • v-abhinavmu's avatar
        v-abhinavmu
        Icon for Community Support rankCommunity Support

        Hi Charline_74​,

        Thanks for reaching out to the Microsoft Fabric Community forum. and thanks to ShivekMaharaj​ for sharing valuable insights.

        Yes. If you retrieve the workspace name from Azure DevOps, you can pass that value to a Fabric notebook when triggering it through the Fabric REST API.

        The Run On Demand Notebook API supports per-run parameters, including text parameters, which can be used to provide values to the notebook at execution time.

        In the notebook, you can designate a parameter cell so that values supplied during execution can overwrite the default values.

        Therefore, the approach could be:
        Azure DevOps -> retrieve workspace name -> call the Fabric Notebook API -> pass the workspace name as a parameter

        The API also supports service principals and managed identities for unattended execution.

        For more details, please refer to the below Official Microsoft Documentation:
        Background Jobs - Run On Demand Notebook - REST API (Notebook) | Microsoft Learn
        Develop, execute, and manage notebooks - Microsoft Fabric | Microsoft Learn

        I hope this helps. Please feel free to reach out if you have any further questions.
        Thank you.