问题描述
我在 Airtable API 和 Power Query 之间建立了连接,用于 Power BI/报告目的。数据通过得很好,但我似乎不允许将其设置为刷新,因为它是一个“动态”源。我在其他 API(例如 http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/)的其他地方找到了有关此问题的文档,但我所看到的解决方案记录在案,但对我不起作用。任何将 RelativePath 参数添加到我的 Web.Contents 调用中的尝试都意味着根本没有数据通过,无论有多少 URI 进入其中。如果有人愿意帮助我编辑我的代码块以便能够刷新,即使它是一个动态的 Web 源,我也将不胜感激,或者帮助我找到下一步可以尝试的新线索。以下是代码的当前功能但仅手动刷新版本,(特定地址/键替换为 *):
let
Pagination = List.Skip( List.Generate( () => [Page_Key = "init",Counter=0],// Start Value
each [Page_Key] <> null,// Condition under which the next execution will happen
each [Page_Key = try if [Counter]<1
then ""
else [WebCall][Value][offset]
otherwise null,// determine the LastKey for the next execution
WebCall = try if [Counter]<1
then Json.Document(Web.Contents("https://api.airtable.com/v0/*****************/*****?",[Headers=[Authorization="Bearer key*****************"]]))
else Json.Document(Web.Contents("https://api.airtable.com/v0/*****************/*****?offset="&[WebCall][Value][offset],[Headers=[Authorization="Bearer key*****************"]])),// retrieve results per call
Counter = [Counter]+1// internal counter
],each [WebCall]
),1
),\#"Json2Table" = Table.RenameColumns(Table.FromList(Pagination,Splitter.SplitBynothing(),null,ExtraValues.Ignore),{{"Column1","stepA.1"}}),#"Expanded to stepA.2" = Table.ExpandRecordColumn(#"Json2Table","stepA.1",{"Value"},{"stepA.2"}),#"Expanded to stepA.3" = Table.ExpandRecordColumn(#"Expanded to stepA.2","stepA.2",{"records"},{"stepA.3"}),#"Rows from stepA.3" = Table.RenameColumns(Table.ExpandListColumn(#"Expanded to stepA.3","stepA.3"),{{"stepA.3","stepB.1"}}),#"Source" = Table.ExpandRecordColumn(#"Rows from stepA.3","stepB.1",{"fields"},{"Src"}),
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)