使用Python在Power BI中自定义视觉

时间:2020-02-13 18:41:14

标签: python powerbi powerbi-custom-visuals

我正在尝试为Python复制此代码,但找不到任何答案:

https://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1

或:

{{3}}

更具体一点: 如何更改提供的解决方案以与script.py而不是script.R

一起使用

我们非常感谢您的帮助。

我发现在此文件夹中有一个名为capabilities.json的文件,因此我认为这是解决方案的一部分:

  "script": {
      "scriptProviderDefault": "R", ###I guess this needs to be changed to Py
      "scriptOutputType": "html",
      "source": {
        "objectName": "rcv_script",# not sure about this
        "propertyName": "source"
      },
      "provider": {
        "objectName": "rcv_script",# not sure about this
        "propertyName": "provider"
      }
    }

在此项目中删除了对referenceecies.json的引用,并将其构建并导入到Power BI之后,我也收到了此错误

 Error Message:
 An exception of type System.ArgumentException occured.

 Stack Trace:
 System.ArgumentException: The supplied rendering engine is not supported
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDat aShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ExecuteDataQuery(IQueryResultDataWriter queryResultDataWriter, EngineDataModel engineDataModel, DataQuery query, Int32 queryId, ServiceErrorStatusCode& serviceErrorStatusCode, CancellationToken cancelToken)
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, IList`1 queries, HashSet`1 pendingQueriesToCancel, EngineDataModel engineDataModel)

0 个答案:

没有答案