Knowledge Management

How to paginate results of collection.data.query?

smitapatankar
Loves-to-Learn

How to paginate results from kv store collection.data.query()?
because if i fetch results as it is, I get limited number of records, while the real number of records are huge.
More likely, it is because of the size of data fetched rather than the record numbers.
It is able to fetch data which when stored in txt is upto 50-55 mb only.

code:

import json
import splunklib.client as client
service = client.connect(
host='xxxx', port=xxxx, username='xxxx', password='xxxxx', owner='xxxxx', app='xxxx')
collection = service.kvstore['xxxx'] # kv store name
response = collection.data.query()
print(len(response))

0 Karma