Knowledge Management

How to paginate results of collection.data.query?

smitapatankar
Engager

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))

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...