Forum Discussion

YashRaj5's avatar
YashRaj5
Frequent Visitor
1 year ago
Solved

Getting lakehouse/warehouse id in the sql endpoint

Hello 

Is there any way to get the workspace id, and lakehouse/warehouse id in the sql endpoint?

 

Like some stores procedure or something is there?

Thanks 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi YashRaj5,

     

    There is no direct built-in SQL function in Microsoft Fabric that lets you query the workspace ID or the Lakehouse/Warehouse ID directly from the SQL endpoint.

     

    Regards,

    Vinay Pabbu

6 Replies

  • DataBard's avatar
    DataBard
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi YashRaj5 ,

    As far as I have seen, I haven't found a way to query the Id of the object from the SQL endpoint.

     

    There are other options, such as notebooks, that you can use to get the Id of the lakehouse/warehouse object. Is there a specific reason you are looking to get the ID from the SQL endpoint?

    • YashRaj5's avatar
      YashRaj5
      Frequent Visitor

      Yea there is notebook, but I was hoping to find a way to build the abfss path for each table present in the warehouse dynamically, and as the path is consist of workspace id and lakehouse id, that's where I needed some Way to make it dynamic.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi YashRaj5,

         

        There is no direct built-in SQL function in Microsoft Fabric that lets you query the workspace ID or the Lakehouse/Warehouse ID directly from the SQL endpoint.

         

        Regards,

        Vinay Pabbu

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi YashRaj5,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Vinay Pabbu