Forum Discussion

stuckerj's avatar
stuckerj
Helper I
9 months ago
Solved

REST API vs. Notebookutils Lakehouse Update Issue

REST API vs. Notebookutils Lakehouse Update Issue Problem Summary I am automating notebook provisioning in Microsoft Fabric and need to programmatically set or update the default Lakehouse for ...
  • v-achippa's avatar
    9 months ago

    Hi stuckerj,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you for sharing the detailed analysis, yes there is a difference between the REST API and the notebookutils behavior.

    At present, updating a notebook’s default Lakehouse is not fully supported through the public REST API. When an .ipynb payload is sent, the API accepts it, returns 202 Accepted but never completes the async update, this is a known product limitation.

    The supported and working method is using notebookutils.notebook.updateDefinition from another notebook. It runs inside fabric with the correct context. If REST must be used then it requires a full .py notebook definition and still may not complete fully.

     

    Thanks and regards,

    Anjan Kumar Chippa

  • v-achippa's avatar
    v-achippa
    9 months ago

    Hi stuckerj,

     

    Yes, that’s exactly the right approach. Creating a separate notebook to programmatically configure or update other notebooks is a solid and supported workaround. It works because the command runs inside the fabric and has the right access to update lakehouse settings properly.

     

    Thanks and regards,

    Anjan Kumar Chippa