【问题标题】:How We fetch data from graphql api in powerBI我们如何在 powerBI 中从 graphql api 获取数据
【发布时间】:2021-12-29 17:49:32
【问题描述】:

我想从 GraphQl api 中直接获取数据到 Power Bi,我该怎么做呢

【问题讨论】:

  • 请编辑问题以将其限制为具有足够详细信息的特定问题,以确定适当的答案。

标签: graphql powerbi bigdata data-manipulation


【解决方案1】:

如果 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"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-28
    • 2019-12-02
    • 2022-11-30
    • 2023-02-03
    • 2022-12-11
    • 2021-12-26
    • 2018-02-25
    • 1970-01-01
    相关资源
    最近更新 更多