Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
is there a way using Powershell Power BI API to extract data source artifacts (i.e database server name, database name, database schema name, database tables, columns names, flat file path and name,..) used by a Power BI dataset/report?
Please kindly assist.
Regards,
Joe
Were you able to extract the tables themselves using the API?
I wish to leverage PowerBI queries for a website I'm building.
Hi Jayendran,
Thanks the API. However I would like to extract database tables names. Can you assist?
Regards,
Joe
Hi @Anonymous ,
There is a seperate API which can gives you the tables Push Datasets - Datasets GetTablesInGroup
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/tables
Note: This API supports only Push datasets (in other words meaning you can only use this API against the datasets created via REST API. A normal dataset published from PBI desktop doesn't support this. )
Hello Jayendran
Our datasets are created from Power BI Desktop, so that API cannot provide me with what I want. Also it extracts Power BI tables, not database tables.
Regards,
Joe
Hi @Anonymous ,
Yes there is a PowerShell (internally calls the PowerBI REST API Datasets - Get Datasources)
REST API : https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasourcesingroup
Invoke-PowerBIRestMethod -Url 'groups/{groupId}/datasets/{datasetId}/datasources' -Method Get
Note that this can only gives the datasources like server,database,url and not schema name,columns name which you posted originally.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |