简体   繁体   English

将 MS Power BI 与 Python/Django 集成

[英]Integrating MS Power BI w/ Python / Django

I am writing a Django multi-tenant web application which is supposed to use Power BI Embedded as a reporting frontend (basically to render data from the local DB).我正在编写一个 Django 多租户 Web 应用程序,它应该使用 Power BI Embedded 作为报告前端(基本上是从本地数据库呈现数据)。 For this, I am using the 'App Owns Data' scenario and created an application in Azure which I can authenticate against Active Directory to retrieve an access token.为此,我使用“应用拥有数据”方案并在 Azure 中创建了一个应用程序,我可以通过 Active Directory 进行身份验证以检索访问令牌。

However, all the code samples I found are 1) not in Python or 2) they don't work.但是,我发现的所有代码示例都 1) 不在 Python 中或 2) 它们不起作用。 I am wondering if anyone successfully used ADAL or the Azure libraries to connect and then the Power BI libraries to render a report?我想知道是否有人成功使用 ADAL 或 Azure 库进行连接,然后使用 Power BI 库来呈现报告?

Thanks!谢谢!

Yes, you can do this.是的,你可以这样做。 Microsoft Azure itself has a sample for authenticating python apps against AAD. Microsoft Azure 本身有一个示例,用于针对 AAD 对 Python 应用程序进行身份验证。 This should be what you are looking for: https://azure.microsoft.com/en-us/resources/samples/data-lake-analytics-python-auth-options/这应该是您要查找的内容: https : //azure.microsoft.com/en-us/resources/samples/data-lake-analytics-python-auth-options/

Check also this sample: https://github.com/snobu/powerbi-embed-v2另请检查此示例: https : //github.com/snobu/powerbi-embed-v2

And this thread: https://community.powerbi.com/t5/Developer/Access-Power-BI-API-with-Python/td-p/189165这个线程: https : //community.powerbi.com/t5/Developer/Access-Power-BI-API-with-Python/td-p/189165

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM