- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
抱歉,我是 Power BI 新手。我正在使用 Power BI 调用 Azure API,该 API 将列出我的订阅中的所有虚拟机,但它只会显示下一个链接之前的前 50 个虚拟机。
这是我正在调用的 API;
https://management.azure.com/subscriptions/< subscription >/providers/Microsoft.Compute/virtualMachines?api-version=2017-12-01
我见过其他页面和论坛也有类似问题(例如 Microsoft API ),但没有针对 Azure API。我搞乱了他们的修复,但无法弄清楚如何将其应用到我的修复中。
他们的代码;
let
GetUserInfo = (Path)=>
let
Source = Json.Document(Web.Contents(Path)),
LL= @Source[value],
result = try @LL & @GetUserInfo(Source[#"@odata.nextLink"]) otherwise @LL
in
result,
Fullset = GetUserInfo("https://graph.microsoft.com/beta/users?$select=manager&$expand=manager"),
#"Converted to Table" = Table.FromList(Fullset, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "displayName", "manager"}, {"Column1.id", "Column1.displayName", "Column1.manager"}),
#"Expanded Column1.manager" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.manager", {"id", "displayName"}, {"id", "displayName"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Column1.manager",{{"Column1.displayName", "Employee Full Name"}, {"Column1.id", "Employee Id"}, {"id", "Manager Id"}, {"displayName", "Manager Full name"}})
in
#"Renamed Columns"
与我通过简单的网络链接连接源后的开始相比;
let
Source = Json.Document(Web.Contents("https://management.azure.com/subscriptions/< subscription >/providers/Microsoft.Compute/virtualMachines?api-version=2017-12-01")),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"
如果我要调整它,我怀疑它会看起来像这样;
let
GetUserInfo = (Path)=>
let
Source = Json.Document(Web.Contents(Path)),
LL= @Source[value],
result = try @LL & @GetUserInfo(Source[#"@odata.nextLink"]) otherwise @LL
in
result,
Fullset = GetUserInfo("https://management.azure.com/subscriptions/< subscription >/providers/Microsoft.Compute/virtualMachines?api-version=2017-12-01"),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"
但是单击“确定”后,系统提示我出现以下错误;
Expression.Error: The name 'Source' wasn't recognized. Make sure it's spelled correctly.
对此的任何帮助将不胜感激。
最佳答案
对于任何感兴趣的人,这就是我通过此链接最终所做的事情:
https://datachant.com/2016/06/27/cursor-based-pagination-power-query/
let
iterations = 10,
url =
"https://management.azure.com/subscriptions/< subscription >/providers/Microsoft.Compute/virtualMachines?api-version=2017-12-01",
FnGetOnePage =
(url) as record =>
let
Source = Json.Document(Web.Contents(url)),
data = try Source[value] otherwise null,
next = try Source[nextLink] otherwise null,
res = [Data=data, Next=next]
in
res,
GeneratedList =
List.Generate(
()=>[i=0, res = FnGetOnePage(url)],
each [i]<iterations and [res][Data]<>null,
each [i=[i]+1, res = FnGetOnePage([res][Next])],
each [res][Data])
in
GeneratedList
一整天的谷歌搜索头痛:S
关于azure - Power BI - 使用 nextLink 调用 Azure API(下一页),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48771173/
我有一个使用 .NET 4.5 的 OData Web API 服务。它有一个 WebApi Controller ,该 Controller 源 self 自己制作的另一个 Controller 。
我正在使用 Google APIs python 客户端从 Google Analytics 下载一些数据。我基本上复制了他们的一个示例并对其进行了修改以完全满足我的需要。 我从示例中提取了这段代码:
我正在尝试访问 Microsoft CRM 2011 产品中的 odata api。它主要按预期工作,除了如果使用 $top 则 odata.nextlink 会丢失。这意味着不可能将分页设置为某个用
我们正在调用图形 API,以使用此 URL 获取 Azure B2C AD 中的用户 https://graph.windows.net/TENANTNAME.onmicrosoft.com/user
我有一个 HTML SIMPLE DOM PARSER 程序... 我的问题是: 我正在尝试获取不同页面上的产品链接。 第一页的链接,收集没问题。 当我尝试访问第二页时,出现了大问题。有一个事件,在不
抱歉,我是 Power BI 新手。我正在使用 Power BI 调用 Azure API,该 API 将列出我的订阅中的所有虚拟机,但它只会显示下一个链接之前的前 50 个虚拟机。 这是我正在调用的
抱歉,我是 Power BI 新手。我正在使用 Power BI 调用 Azure API,该 API 将列出我的订阅中的所有虚拟机,但它只会显示下一个链接之前的前 50 个虚拟机。 这是我正在调用的
我有以下代码从 Dynamics CRM 检索交易(使用 OData 查询): public async Task> GetTransactions() { var t
我尝试使用此处给出的代码列出 Azure 中订阅中的所有虚拟机: from azure.mgmt.compute import ComputeManagementClient from azure
删除我的代码作为等式的一部分,我能够通过 Microsoft Graph API Explorer 重现它。 首先,我执行 GET https://graph.microsoft.com/v1.0/u
我是一名优秀的程序员,十分优秀!