Executions and Results
Sampling
Our API supports sampling on all /results
endpoints to provide a uniform sample of the dataset for efficient data analysis and visualization. This feature is particularly useful for use cases like charting (if you only have 4 000 pixels on the chart, then 10 000 datapoints are plenty), where analyzing a full dataset isn’t necessary. Sampling returns a subset (with a uniform distribution) of data, optimizing usage of very large results with reduced latency and costs. You can apply sampling to the following endpoints:
Example Sampling Request
Sampling Parameters
sample_count
- Type:
integer
- Description: Determines the number of rows to return as a sample from the result set. If the available dataset contains fewer rows than the specified
sample_count
, the entire dataset is returned.
- Sampling is designed to provide a randomized subset of data, with each request potentially producing different outcomes.
- When specifying
sample_count
(e.g.,sample_count = 10000
), the number is approximate. The actual number of rows returned may vary slightly (e.g., 10013, 10017), reflecting the probabilistic nature of the sampling process. sample_count
is incompatible withoffset
,limit
, andfilters
parameters.sample_count
can be used withcolumns
to specify which data fields to include in the sample.- Specifying a low
sample_count
relative to total rows, being probabilistic, may return 0 rows due to the probability based sampling calculation (e.g., 10 in 100,000, means each row has ~0.01% chance to be included)
Sampling Response
Was this page helpful?