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,
I’m looking for an automated way to retrieve source table-level lineage for Power BI reports.
Our organization has hundreds of reports, and manually downloading each one to check the source queries or objects is not feasible.
For example:
Power BI Table Name: Sales Data
Source Table Name: Schema: XXMS, Table: DWC_sales_data
Is there a way to automate this process using Power BI REST API, Metadata Scanning, or any other method? Any guidance or best practices would be greatly appreciated!
Thank you.
Solved! Go to Solution.
Hello @AdityaPrasad
The Power BI REST API provides a structured way to extract metadata, including lineage information, from your Power BI environment. The Metadata Scanner API, in particular, is designed for extracting detailed metadata about datasets, tables, columns, and their relationships.
https://www.brunner.bi/post/complete-semantic-model-lineage-in-the-power-bi-service-1
https://powerbi.microsoft.com/en-us/blog/new-scanner-api-scenarios
1. List Workspaces: Use the `GetGroupsAsAdmin` API to retrieve all workspace IDs in your tenant.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/groups?$top=5000`
2. Scan Workspaces: Use the `PostWorkspaceInfo` API to initiate a metadata scan for specific workspaces.
• Endpoint: `POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage=True&datasourceDetails=True`
• Include workspace IDs in the request body.
3. Retrieve Scan Results: Use the `GetScanResult` API to fetch the scan results containing lineage data.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}`
4. Parse Results: Extract and analyze the JSON response to identify relationships between Power BI tables and their source tables.
Hi @AdityaPrasad,
I wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
If the community member's answer your query, please mark it as "Accept as Solution" and select "Yes" if it was helpful.
If you need any further assistance, feel free to reach out.
Please continue using Microsoft community forum.
Thank you,
Pavan.
Hi @AdityaPrasad,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution" and give a 'Kudos' so other members can easily find it.
Thank you,
Pavan.
Hi @AdityaPrasad,
Thank you for reaching out in Microsoft Community Forum.
Thank you @nilendraFabric for the helpful response.
As suggested by nilendraFabric, I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.
Please continue using Microsoft community forum.
Regards,
Pavan.
Hello @AdityaPrasad
The Power BI REST API provides a structured way to extract metadata, including lineage information, from your Power BI environment. The Metadata Scanner API, in particular, is designed for extracting detailed metadata about datasets, tables, columns, and their relationships.
https://www.brunner.bi/post/complete-semantic-model-lineage-in-the-power-bi-service-1
https://powerbi.microsoft.com/en-us/blog/new-scanner-api-scenarios
1. List Workspaces: Use the `GetGroupsAsAdmin` API to retrieve all workspace IDs in your tenant.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/groups?$top=5000`
2. Scan Workspaces: Use the `PostWorkspaceInfo` API to initiate a metadata scan for specific workspaces.
• Endpoint: `POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage=True&datasourceDetails=True`
• Include workspace IDs in the request body.
3. Retrieve Scan Results: Use the `GetScanResult` API to fetch the scan results containing lineage data.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}`
4. Parse Results: Extract and analyze the JSON response to identify relationships between Power BI tables and their source tables.
You may want to consider using Purview, or at least the Scanner API.
User | Count |
---|---|
24 | |
17 | |
6 | |
5 | |
2 |
User | Count |
---|---|
49 | |
43 | |
18 | |
7 | |
6 |