Forum Discussion
VSTS odata refresh issue
The data sources shown are from the analytics view feature. We are accessing it via the odata feed using the VSTS.Feed() method to get complete work item histories over a 6 month period. The reason for multiple queries is because a single query with 6 months of data returns >300K rows.
As best I can tell, the problem seems to be an issue in the VSTS.Feed() method itself.
- A single call to VSTS.Feed() in a query works properly in apps.powerbi.com.
- Multiple, sequential calls to VSTS.Feed() in a query work
- Multiple calls to VSTS.Feed() in an each loop cannot be refreshed in apps.powerbi.com. They fail as shown
in the original message. - Using VSTS.Contents() in an each loop refreshs without issue. However, this method is deprecated, doesn't return
all of the data (it provides a continuation token), and also returns a binary object which is harder to process. - Using VSTS.AccountContents()--which replaces VSTS.Contents()--fails the same way that VSTS.Feed() does.
- Using OData.Feed()--which was replaced by VSTS.Feed()--fails the same way that VSTS.Feed() does. It also
doesn't return all of the data, but instead returns a continuation token.
Given the number of options provided to run a query, it would be nice if one of them worked.
There are two things going on here:
The reason VSTS.Feed is breaking is because of dynamic URL generation and how that works with PowerBI - PowerBI has data source code analysis that doesn't support this kind of flow.
You are also trying to download complete WorkItemSnapshot data via this method and aggregate it in Powerbi.
VSTS specifically blocks complete WorkItemSnapshot download for performance reasons:
You should instead use Analytics views - which will pre-aggregate your data on VSTS side.