Forum Discussion

UmeshGoti's avatar
UmeshGoti
Helper I
1 year ago
Solved

While Creating Semantic Layer in directQuery Mode Need to attach with database

Hello Community,   As part of report migration project from other technologies to PowerBi. i am using Fabric Rest APIs (https://learn.microsoft.com/en-us/rest/api/fabric/semanticmodel/items/create-...
  • ibarrau's avatar
    1 year ago

    Hi. Like the UI after you publish a new semantic model, the first thing would be edit it's credentials at the settings of configure a gateway. Using the API for changing data source or creating a new semantic model is the same here. Until a month or two it was mandatory to do it at the UI. Nowadays there is a Fabric Rest API request that might let you write the credentials. I haven't tested yet how it works but I know it's preview. You can try it if you want to keep all in code: https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/update-connection?tabs=HTTP

    I hope that helps,