Forum Discussion

UmeshGoti's avatar
UmeshGoti
Helper I
1 year ago
Solved

Need to Create semantic layer connected with direct database through rest API of power bi

Hello Community,

  Recently, i have started on one requirement where i need to migrate reports from other technologies to PowerBi
so as part of report migration i am using power bi rest api (https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets)
which supports to create datasets in PUSH mode.
using which i am able to call Power Bi Rest API to create datasets and add data into datasets  using JSON format.

but problem is actual report's data are available in millions of rows. stored in some database tables. so, we can not provide in JSON as a static data.

Our requirement is we need to create Power Bi semantic layer through Rest API (or any other programmatic approach) which can be connected with some dataSource like MySQL Database tables.

or just ket me know if i need to use any other approach to achieve this functionality !!

Thanks !!

3 Replies

  • Push datasets have avery different purpose, and they have size limitations - 5 million rows if I remember correctly.

     

    Regular semantic models do not support push, they pull the data from the data source (in import mode) or they link to the data source (in direct query mode).  

     

    The REST API has methods that allow you to create artifacts from scratch, and to set up refresh for these artifacts. However this requires a substantial amount of preparation, and is usually limited to OEM setups.  For your testing and for standard scenarios you are better off creating and configuring these artifacts manually.

    • UmeshGoti's avatar
      UmeshGoti
      Helper I

      Thanks lbendlin
          for quick and useful response.
      as you mentioned about creating artifacts from scratch didn't get more idea.
      now just i need to get more idea about by which documentation i can create  Regular semantic models with power bi REST api 
      can you just provide me some hint links

      Because my ultimate goal is  we need to create Power Bi Regular semantic layer through Rest API (or any other programmatic approach) which can be connected with some dataSource like MySQL Database tables.

      Thanks in advance

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hi UmeshGoti,
    Thank you for reaching out to the Microsoft Fabric Community Forum regarding the issue you're experiencing.

    In addition to the helpful response provided by lbendlin  , I would like to share a document that may assist you. 
    https://learn.microsoft.com/en-us/rest/api/fabric/semanticmodel/items/create-semantic-model?tabs=HTTP

    If this helps then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.

    Hope this works for you!

    Thankyou.