OData paginates by default - see the note about a skipToken OData Support - Teiid 8.12 - Project Documentation Editor
OData client tools should understand this automatically, but manually making the rest calls you have to be aware of the batching behavior.
Thanks for reply.
I have gone throw this. Still facing below issue.
<message lang="en-US">String index out of range: -1</message>
There is another issue which i am facing is:
when i execute VDB using below script:
SELECT * FROM employeeService.employee
it returns me 500 records.
but when i below URL, it returns me only 11 records
i don't know why?
Please suggest what to do.
1) $skiptoken needs to be a non-negitive number. -1 is not a valid value per OData specification.
2) $skiptoken=256 is valid, however there needs to enough rows in your table to support the query. For example if you only have 10 rows, if you skip 256, your request will end up in error.
On returning 11 records case, that should NOT be the behavior, it should return the all 500 records or whatever the current page size is. If you turn on debug on the server, you can see the query being generated on the Teiid server, which may give further insight into what may be happening. Also when you look at the pay load, if there a entry something like "nexturl" that will also note the pagesizes.
Another recommendation I have is, you seem to be using OData V2 based URL, which is deprecated and was removed in Teiid 9.1 version. Try using OData V4 which is the latest specification. See documentation how the URL changes little bit for V4.
To clarify, a skipToken is opaque - [MS-ODATA]: Skip Token System Query Option ($skiptoken) which as Ramesh is pointing out this means that it should be determined only from the response message nextLink. Using an arbitrary value is leading to an exception, which we should be providing a better error message for - [TEIID-4695] Provide a better error with an invalid error code - JBoss Issue Tracker