【发布时间】:2021-12-29 17:49:32
【问题描述】:
我想从 GraphQl api 中直接获取数据到 Power Bi,我该怎么做呢
【问题讨论】:
-
请编辑问题以将其限制为具有足够详细信息的特定问题,以确定适当的答案。
标签: graphql powerbi bigdata data-manipulation
我想从 GraphQl api 中直接获取数据到 Power Bi,我该怎么做呢
【问题讨论】:
标签: graphql powerbi bigdata data-manipulation
如果 API 的身份验证是 API Key、Basic、Windows 或 AAD,您可以使用 Web 连接器。对于其他身份验证方案,您可能需要custom connector。
我会为此使用高级 Power Query 编辑器,而不是尝试通过向导进行配置。
EG
let
uri = "https://countries.trevorblades.com",
query = "{
country(code: ""BR"") {
name
native
capital
emoji
currency
languages {
code
name
}
}
}",
source = uri & "?query=" & Uri.EscapeDataString(query),
resp = Web.Contents(source),
json = Json.Document(resp,65001),
data = json[data],
country = data[country],
#"Converted to Table" = Record.ToTable(country),
#"Pivoted Column" = Table.Pivot(#"Converted to Table", List.Distinct(#"Converted to Table"[Name]), "Name", "Value")
in
#"Pivoted Column"
【讨论】: