Implement iteration when querying datagrepper to retrieve all the data