嵌入直接查询的 PowerBI 出现白屏和 403
PowerBI embedded with Direct Query gets white screen and 403
我们有一个连接到本地 SQL 服务器的 PowerBI 报告。此服务器已移至 Azure,因此我们将报告更改为现在使用直接查询而不是导入。
为此,我进入了现有的 PBIX 并更改了数据源设置,以便报告数据集现在是一个指向 azure SQL 服务器的直接查询。
之后,我使用“powerbi 导入”将我的 PBIX 导入了我的 Azure PowerBI 工作区。然后我更新了数据集,因为它是直接查询并且需要使用“powerbi update-connection”
更新凭据
所有这些步骤都成功了。
然后我可以继续获取我的报告“powerbi get-reports”并获得访问权限“powerbi create-embed-token”。这也有效。
报表在嵌入式设置中加载,但保持白色。好像没有数据或者没有连接。
PowerBI 生成一个我们通常看不到的奇怪错误:
GET https://wabi-us-north-central-redirect.analysis.windows.net/powerbi/metadata/models/xxxxxxx/?modelOptions=Default&packageId=xxxxxxx 403 (Forbidden)
我们有很多其他报告 运行 直接查询到其他 Azure SQL 服务器,但 none 在迁移到 Azure 的 SQL 服务器上是成功的.
我也在尽快和微软商谈。
Update: Microsoft is looking at the problem. It seems my data source object got into a corrupt state due to a initial db property set (basically a bug). Will keep this post updated.
Update2: It seems PowerBi workspaces in Azure created before April/17 do not support connecting to more than one SQL Database. The solution would then be to create a different workspace but it seems PowerBi workspaces created via Azure are now deprecated. The solution is to migrate everything to the powerbi service(app.powerbi.com). A lot of rework in perspective.
该错误与身份验证有关。作为解决方法,尝试修改身份验证以提示输入凭据。
希望对您有所帮助。
我终于解决了这个问题。用了一个月。
问题是 2 倍:
我一直使用的 PowerBi Azure 工作区集合是在 2017 年 4 月之前创建的,这意味着它不支持连接到多个 SQL 服务器实例。据我所知,这是没有记录的。
我用来调用 PowerBi API 的 PowerBi CLI 命令已被修改,因此我的连接字符串格式现在已被弃用。 MS 产品团队为我提供了正确的格式。他们确实说过这是什么时候改变的,但它确实改变了。
我的版本:
powerbi update-connection -c [Workspace Collection Name] -k [Access Key] -w [Workspace Id] -d [Dataset Id] -s "Data Source=[Server];Initial Catalog [DB];User ID=[user];Password=[pwd]"
有效版本:
powerbi update-connection -c [Workspace Collection Name] -k [Access Key] -w [Workspace Id] -d [Dataset Id] -s "Data Source=[server];Initial Catalog=[db];" -u "[user]" -p "[pwd]"
我们有一个连接到本地 SQL 服务器的 PowerBI 报告。此服务器已移至 Azure,因此我们将报告更改为现在使用直接查询而不是导入。
为此,我进入了现有的 PBIX 并更改了数据源设置,以便报告数据集现在是一个指向 azure SQL 服务器的直接查询。
之后,我使用“powerbi 导入”将我的 PBIX 导入了我的 Azure PowerBI 工作区。然后我更新了数据集,因为它是直接查询并且需要使用“powerbi update-connection”
更新凭据所有这些步骤都成功了。
然后我可以继续获取我的报告“powerbi get-reports”并获得访问权限“powerbi create-embed-token”。这也有效。
报表在嵌入式设置中加载,但保持白色。好像没有数据或者没有连接。
PowerBI 生成一个我们通常看不到的奇怪错误:
GET https://wabi-us-north-central-redirect.analysis.windows.net/powerbi/metadata/models/xxxxxxx/?modelOptions=Default&packageId=xxxxxxx 403 (Forbidden)
我们有很多其他报告 运行 直接查询到其他 Azure SQL 服务器,但 none 在迁移到 Azure 的 SQL 服务器上是成功的.
我也在尽快和微软商谈。
Update: Microsoft is looking at the problem. It seems my data source object got into a corrupt state due to a initial db property set (basically a bug). Will keep this post updated.
Update2: It seems PowerBi workspaces in Azure created before April/17 do not support connecting to more than one SQL Database. The solution would then be to create a different workspace but it seems PowerBi workspaces created via Azure are now deprecated. The solution is to migrate everything to the powerbi service(app.powerbi.com). A lot of rework in perspective.
该错误与身份验证有关。作为解决方法,尝试修改身份验证以提示输入凭据。
希望对您有所帮助。
我终于解决了这个问题。用了一个月。
问题是 2 倍:
我一直使用的 PowerBi Azure 工作区集合是在 2017 年 4 月之前创建的,这意味着它不支持连接到多个 SQL 服务器实例。据我所知,这是没有记录的。
我用来调用 PowerBi API 的 PowerBi CLI 命令已被修改,因此我的连接字符串格式现在已被弃用。 MS 产品团队为我提供了正确的格式。他们确实说过这是什么时候改变的,但它确实改变了。
我的版本:
powerbi update-connection -c [Workspace Collection Name] -k [Access Key] -w [Workspace Id] -d [Dataset Id] -s "Data Source=[Server];Initial Catalog [DB];User ID=[user];Password=[pwd]"
有效版本:
powerbi update-connection -c [Workspace Collection Name] -k [Access Key] -w [Workspace Id] -d [Dataset Id] -s "Data Source=[server];Initial Catalog=[db];" -u "[user]" -p "[pwd]"