OdataLink Error Code 9008: Xero imposed a limit of 100,000 records per request

From OdataLink
Jump to navigation Jump to search

Error 9008 will be logged when Xero imposes the limit of 100,000 records per request.


Why am I receiving this error

To ensure the best performance on Xero's API servers, Xero prevents certain requests from consuming too much resources. This is known as the Xero High Volume threshold limit.

It's important to understand that Xero can raise this error even if the number of records that it would return is considerably lower. This is due to how builds it's pages of data. It uses specialised indexes to quickly determine the data you need. While the actual records that gets returned could be lower, the error is triggered when these indexes have more than 100,000 records.


Apply additional filters to your power queries to prevent this error

One way you can prevent this error from occurring is by applying additional filters to your queries. Typically, the Date, Type and Status fields of their endpoint are associated with additional optimised indexes. By filtering by these fields, Xero can look at smaller indexes to provide your data.


Configure the model Archive Paging setting to prevent this error

Another way to prevent this error is by controlling the date range of the data you request.

OdataLink provides an Archive Paging setting. This model setting can either be set to By Month or By Year. Doing so ensures that OdataLink asks for small amounts of data. In other words, it asks for a single month or a single year of data at a time. It chains multiple calls together to provide the complete data set. By paging in this way, this instructs Xero to look at a different kind of index and should allow you to retrieve all the data you need.

See Editing a model's details for instructions on how to configure your model.


Xero API

See Xero High Volume threshold limits on the Xero API site for further information.


Related Topics

OdataLink OData feed error codes
Troubleshooting Guides