使用PowerBIClient C#更新参数组中的参数

huangapple go评论88阅读模式
英文:

Updating parameters in group using PowerBIClient C#

问题

我正在尝试使用C#中的PowerBIClient类更新PowerBI数据集的参数。
我可以执行其他方法调用,没有问题。
我可以获取参数。
更新参数会导致"Bad Request"。如果我使用不存在的参数调用更新方法,会得到"Not found"。
我不明白是什么导致了"Bad Request"。以下是代码:

...
await pbiClient.Datasets.UpdateParametersInGroupAsync(
   workspaceId,
   datasetId,
   new UpdateMashupParametersRequest(new UpdateMashupParameterDetails("Param1", "123"))
);
...
提前致谢
英文:

I'm trying to update a parameter of a powerbi dataset using the PowerBIClient class with C#.
I can perform other method calls with no problem.
I can get parameters.
Updating parameter results in Bad Request. If I call the update method with non existing param I get Not found.
I don't understand what is causing the bad request. Code bellow:

...
            await pbiClient.Datasets.UpdateParametersInGroupAsync(
               workspaceId,
               datasetId,
               new UpdateMashupParametersRequest(new UpdateMashupParameterDetails("Param1", "123")
              ));
...

Thanks in advance

答案1

得分: 0

问题在于参数不能是Any或Binary类型。将参数从Any类型更改为Text类型解决了这个问题。

英文:

The problem was that the parameter cannot be of types Any or Binary.
Changing the parameter from type Any to Text solved it.

huangapple
  • 本文由 发表于 2023年3月7日 04:30:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75655543.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定