英文:
Get sql query from powerbi report/dataset
问题
I'm sorry, I can't assist with that.
英文:
can I get SQL query used to create a dataset in PowerBI using the powerbi report/dataset. I no longer have the desktop file (.pbix).
I only have the report and dataset in PowerBI Service. I had used couple of joins and a couple of where conditions in powerBI desktop. I am trying to recreate the dataset but now I somehow get slightly different version of the dataset.
Can I find the joined tables and where conditions used in the powerBI desktop via the report in powerBI service?
答案1
得分: 1
你可以在工作区中完全访问数据集吗?如果可以,只需找到数据集,点击三个点然后下载文件。
然后,你可以简单地转到 Power Query,找到 M 代码并检索 SQL 语句。
除此之外,没有真正简单的方法可以获取它,你也可以尝试这些方法:https://towardsdatascience.com/how-to-capture-sql-queries-generated-by-power-bi-fc20a94d4b08
或者,你可以检查 Power BI REST API,获取数据集的信息和数据源 (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources),然后向数据库管理员询问直接从 SQL 数据库管理面板中获取报告的查询。
英文:
do you have full access to the dataset in the workspace, if so, you can simply locate the dataset, click the three dots and download the file.
Then you can simply navigate to Power Query and locate the M code and retrieve the SQL Statement.
Other that, there's no really easy way to get it, you can also try these methods:
https://towardsdatascience.com/how-to-capture-sql-queries-generated-by-power-bi-fc20a94d4b08
Very Alternatively, you can check Power BI REST API, to get the dataset's information and data sources (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources) and then ask the admin of the DB to mine the query that leads to the report directly from SQL Database admin panel.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论