Forum Discussion
How to Retrieve Raw Data from Power BI Dataset Linked to On-Premises Database via API?
- 1 year ago
Yes. The Power Bi Rest API interacts with Power Bi only. It won't query a data source, it query Power Bi Dataset/semantic model.
Regards
So, If I am not wrong you are suggesting importing the data into a new workspace so that it becomes available in Power BI rather than relying on the on-premises database. From this new workspace, we can execute queries to retrieve the data.
I'm just wondering—if this is the approach, can I split the data into pages while importing and directly export them as XLSX files from new workspace?
Also, for direct database queries/scripts, I am restricted from establishing a database connection due to security constraints.
Note: I'm doing all this because I am automating a Power BI report by logging into the Power BI website and exporting the data to Excel. However, due to frequent changes in element IDs, I am trying to switch to an API-based . Also the report I am trying to get through API is from shared database.
I'm not suggesting importing data in a new workspace. I was assuming you already have a Power Bi Dataset published in a workspace because you have shown the Rest API of Power Bi Service that involves having a workspace with the dataset. The Power Bi Rest API allows you to read a Dataset published at Service. So the approach pre require the power bi dataset in a workspace. Otherwise if you don't have anything in a workspace you should think in an alternative tool or script to get the data and export it directly to excel without power bi.
I hope that make sense
- DineshKumaran1 year agoRegular Visitor
Yes, I do have a dataset published under a workspace with premium capacity. So, to confirm, does this mean that retrieving raw data from the dataset for an on-premises data source is not possible through the API?
- ibarrau1 year ago
Super User
Yes. The Power Bi Rest API interacts with Power Bi only. It won't query a data source, it query Power Bi Dataset/semantic model.
Regards