Search code examples
javapaginationredhat-datavirt

Extending JBoss Data Virt ws translator to handle paginated source


What is a good way to extend org.teiid.translator.ws to read a complete set of records by iterating over all pages returned by a paginated webservice?


Solution

  • Since the pagination of results is not part of any REST API standard (unlike OData), you would have to extend the current translator and provide that custom behaviour to scroll through the pagination. Unlike JDBC kind of resultset scrolling, you would need to devise a way to execute the URL with your offsets each time the Teiid engine asks for next batch of results. If you want an example take look at OData translator for similar flow.