Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
357 views
in Technique[技术] by (71.8m points)

powerquery - Excel Power Query: how to prevent multiple requests for the same source (web json)?

I have a REST endpoint that queries the data in JIRA and returns the data for activeSprint and previousSprint so the user can build a burndown chart, similar to this:

{
   activeSprint: ['..burndown data array..'],
   previousSprint: ['..burndown data array..'] 
}

So in power query I setup the first query which is only representing the connection-only to the source

JSON

let
    Source = Json.Document(Web.Contents("https://.../burndown"))
in
    Source

Then I make a reference of the query called JSON and create a new query called Active Sprint

let
    Source = JSON,
    activeSprint = Source[activeSprint],
    burndownData = activeSprint[burndownData],
    #"Converted to Table" = Table.FromList(burndownData, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"date", "dateFormatted", "storyPoints", "issueCount", "issues", "plannedStoryPoints"}, {"date", "dateFormatted", "storyPoints", "issueCount", "issues", "plannedStoryPoints"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Column1",{{"dateFormatted", type datetime}, {"date", type datetime}})
in
    #"Changed Type"

then I do the same as per above for the Previous Sprint query.

I group all the queries together in XLS into one group called TEST1 so it looks like this: enter image description here

When I right click on the group Test1 and click refresh, it makes 2 requests to the API. Can I make it just one call since the source is the same for both ??

The dependency in the Power Query Editor is correct, but I don't get it why it sends 2 separate requests ??

enter image description here

Thanks

question from:https://stackoverflow.com/questions/65930859/excel-power-query-how-to-prevent-multiple-requests-for-the-same-source-web-jso

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...