Forum Discussion

jaryszek's avatar
jaryszek
Icon for Super User rankSuper User
1 year ago
Solved

How to publish power bi without data?

Hi ,

i can not find information how to publish data without datasource. 

The workflow is:
1. Upload report in *.pbix using POST rest api:
https://learn.microsoft.com/en-us/rest/api/power-bi/imports/post-import 

2. Update parameters

3. Refresh report. 

I am concern that I will publish report with data already and if something will crash during updating parameters or refreshing report - it will be available for user. 
I am using entirely Customer Tenant and connection strings are pointing directly into Customer database. 

So if I will upload all data or my company data into their tenant - somebody not invited can look at data. 

My idea is to not upload any data. Just upload only schema and tables without any rows. 
How to do this? 

Best,
Jacek


  • lbendlin's avatar
    lbendlin
    1 year ago

    Yes, you can use parameters to indicate if all rows should be read or 0 rows should be read.  You cannot not read, because power query needs the meta data.

8 Replies

  • Sounds good. What have you tried and where are you stuck?  You can also connect to a SQL data source and say "Select top 0 * from table"  so that the meta data is filled but the data is missing.

    • jaryszek's avatar
      jaryszek
      Icon for Super User rankSuper User

      lbendlin I tried these steps. And they are working, but my concern is that I will publish something with data and after that I will update parameters and the process can be broken - it means that published, initial data will be available for customer which I do not want to! 

      So following your thinking. Maybe i should have parameter like "No Data" and if this is chosen on local version - it should remove all rows within power query and keep only table headers. 

      Can you please confirm that it can be a potential solution?

      Best Wishes,
      Jacek



      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        Yes, you can use parameters to indicate if all rows should be read or 0 rows should be read.  You cannot not read, because power query needs the meta data.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi @jaryszek ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    As you have mentioned, your workflow involves obtaining the report from the REST API, updating parameters, and refreshing reports, which sounds like a solid plan. @lbendlin  has already suggested an idea related to parameters, and your concern is with the customer user. The Power BI workspace is entirely on the Customer Tenant, it allows the customer to access their workspace and download reports as needed. Therefore, you want to publish the report without data.

     

    Based on your need to upload reports without exposing sensitive data, here are some approaches you can consider:

     

    When embedding reports, you can use the Power BI Embedded API to generate embed tokens that initially do not allow data access. Once the report is ready, you can update the token to grant access to the real data.

    • Provides fine-grained control over data visibility, can be easily automated in your embedded application, and prevents unauthorized data exposure.

     

    For detailed information, please refer to the following documentation for a better understanding:

    https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-core

    https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-tokens?tabs=embed-for-customers

     

    Row-Level Security (RLS) can be configured to restrict data access based on user roles. You can set an RLS filter that hides data initially and later adjust it to allow data visibility once the configuration is finalized.

    • Enables full data control while ensuring data security based on user roles and allows you to change data visibility dynamically.

    Kindly, refer the below documentation for detail information:

    https://learn.microsoft.com/en-us/power-bi/guidance/rls-guidance

     

    I hope my suggestions give you good ideas, if you need any further assistance, feel free to reach out.

    If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you.