curl - 在 PowerBi 中使用 cURL
问题描述
是否可以通过 cURL 将数据集连接到 PowerBI ?
我有 graphql 生成的 cURL 但不确定我可以在 PB 中以某种方式使用它
curl 'https://api.com/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://api.com' -H 'access_token: <my Token>' --data-binary '{"query":"# Write your query or mutation here\n{\n members{\n data{\n user{\n name\n }\n }\n }\n}\n"}' --compressed
到目前为止,我设法在 m 代码下创建,但我没有工作。我是 M 语言的新手,有人可以支持我吗?
let
apiUrl = "https://apiname.com/graphql",
options =
[Headers =[#"Content-Type"="application/json", #"Subscription-Key"="<my token>"],
Content = Text.ToBinary({"query:{\n members{\n data{\n user{\n name\n }\n }\n }\n}\n"})
],
Content = options[Content]
in
Content
错误消息:我们无法将列表类型转换为文本类型
解决方案
推荐阅读
- python - Can the input for "Lasso" in python contain categorical variables?
- blazor - 使用 Blazor 验证时如何清除错误消息
- php - 如何在 PHP 中跟踪目录的索引
- git - How to check for not pushed changes to Gerrit
- php - Login system data validating from database
- java - 自定义模型的缓存/持久性的最佳方法
- python - When build with py2app can't save in folder
- java - Are there some common techniques for Java Web Servers to detect when approaching overload?
- oracle - 将 SQL Server 查询转换为 Oracle
- rest - Clojure:如何为服务器设置特定的 url?