public class PivotSpecification extends Object
Modifier and Type | Method and Description |
---|---|
PivotSpecification |
addCellValue(String field,
String label,
StatsFunction statsFunction)
Add an aggregate to each cell of the pivot.
|
PivotSpecification |
addColumnSplit(String field)
Add a column split on a string or number valued field, producing a column for
each distinct value of the field.
|
PivotSpecification |
addColumnSplit(String field,
Integer start,
Integer end,
Integer step,
Integer limit)
Add a column split on a numeric field, splitting the values into ranges.
|
PivotSpecification |
addColumnSplit(String field,
String trueDisplayValue,
String falseDisplayValue)
Add a column split on a boolean valued field.
|
PivotSpecification |
addColumnSplit(String field,
TimestampBinning binning)
Add a column split on a timestamp valued field.
|
PivotSpecification |
addFilter(String field,
BooleanComparison comparison,
boolean compareTo)
Add a filter on a boolean valued field.
|
PivotSpecification |
addFilter(String field,
IPv4Comparison comparison,
String comparisonValue)
Add a filter on an IPv4 valued field.
|
PivotSpecification |
addFilter(String field,
NumberComparison comparison,
double comparisonValue)
Add a filter on a numeric field.
|
PivotSpecification |
addFilter(String field,
StringComparison comparison,
String comparisonValue)
Add a filter on a string valued field.
|
PivotSpecification |
addFilter(String field,
String sortAttribute,
SortDirection sortDirection,
int limit,
StatsFunction statsFunction)
Add a filter that limits the number of values of an aggregated field that will be allowed
into the pivot.
|
PivotSpecification |
addRowSplit(String field,
String label)
Add a row split on a numeric or string valued field, splitting on each distinct value of the field.
|
PivotSpecification |
addRowSplit(String field,
String label,
Integer start,
Integer end,
Integer step,
Integer limit)
Add a row split on a numeric field, splitting into numeric ranges.
|
PivotSpecification |
addRowSplit(String field,
String label,
String trueDisplayValue,
String falseDisplayValue)
Add a row split on a boolean valued field.
|
PivotSpecification |
addRowSplit(String field,
String label,
TimestampBinning binning)
Add a row split on a timestamp valued field, binned by the specified bucket size.
|
String |
getAccelerationNamespace() |
Collection<PivotCellValue> |
getCellValues() |
Collection<PivotColumnSplit> |
getColumnSplits() |
Collection<PivotFilter> |
getFilters() |
Collection<PivotRowSplit> |
getRowSplits() |
Pivot |
pivot()
Query Splunk for SPL queries corresponding to this pivot.
|
PivotSpecification |
setAccelerationJob(Job job)
Set a job with a query ending in tscollect, usually generated by createLocalAccelerationJob on a
DataModelObject instance, as the acceleration cache for this pivot.
|
PivotSpecification |
setAccelerationJob(String sid)
Set a job with a query ending in tscollect, usually generated by createLocalAccelerationJob on a
DataModelObject instance, as the acceleration cache for this pivot.
|
PivotSpecification |
setAccelerationNamespace(String namespace)
Set the namespace to use for this acceleration, usually the name of a data model.
|
public PivotSpecification setAccelerationNamespace(String namespace)
namespace
- a string specifying a namespace.public PivotSpecification setAccelerationJob(String sid)
sid
- the SID of a job.public PivotSpecification setAccelerationJob(Job job)
job
- a Job object.public String getAccelerationNamespace()
public PivotSpecification addFilter(String field, BooleanComparison comparison, boolean compareTo)
field
- the name of the fieldcomparison
- a comparison operator for the filtercompareTo
- the value to compare the field topublic PivotSpecification addFilter(String field, StringComparison comparison, String comparisonValue)
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field topublic PivotSpecification addFilter(String field, IPv4Comparison comparison, String comparisonValue)
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field topublic PivotSpecification addFilter(String field, NumberComparison comparison, double comparisonValue)
height > 6
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field topublic PivotSpecification addFilter(String field, String sortAttribute, SortDirection sortDirection, int limit, StatsFunction statsFunction)
field
- the name of a fieldsortAttribute
- field to aggregate for limitingsortDirection
- whether to take the lowest or highest values of the aggregated fieldlimit
- how many values of the aggregated field to takestatsFunction
- the function to use for aggregationpublic PivotSpecification addRowSplit(String field, String label)
field
- name of the field to split onlabel
- a human readable name for this set of rowspublic PivotSpecification addRowSplit(String field, String label, Integer start, Integer end, Integer step, Integer limit)
'for i in <start> to <end> by <step>'
but with a maximum
number of bins <limit>
. This dispatches to the stats and xyseries search commands.
See their documentation for more details.field
- The field to split onlabel
- a human readable name for this set of rowsstart
- the value of the start of the first range, or null to take the lowest value in the events.end
- the value for the end of the last range, or null to take the highest value in the events.step
- the width of each range, or null to have Splunk calculate it.limit
- the maximum number of ranges to split into, or null for no limit.public PivotSpecification addRowSplit(String field, String label, String trueDisplayValue, String falseDisplayValue)
field
- String valuelabel
- String valuetrueDisplayValue
- the string to display in the true valued row label.falseDisplayValue
- the string to display in the false valued row label;public PivotSpecification addRowSplit(String field, String label, TimestampBinning binning)
field
- the name of the field to split on.label
- a human readable name for this set of rowsbinning
- the size of bins to usepublic PivotSpecification addColumnSplit(String field)
field
- the field to split on.public PivotSpecification addColumnSplit(String field, Integer start, Integer end, Integer step, Integer limit)
field
- the field to split on.start
- the value of the start of the first range, or null to take the lowest value in the events.end
- the value for the end of the last range, or null to take the highest value in the events.step
- the width of each range, or null to have Splunk calculate it.limit
- the maximum number of ranges to split into, or null for no limit.public PivotSpecification addColumnSplit(String field, String trueDisplayValue, String falseDisplayValue)
field
- the field to split on.trueDisplayValue
- the string to display in the true valued column label.falseDisplayValue
- the string to display in the false valued column label.public PivotSpecification addColumnSplit(String field, TimestampBinning binning)
field
- the field to split on.binning
- what time periods to use for binning valued of the field.public PivotSpecification addCellValue(String field, String label, StatsFunction statsFunction)
field
- the field to aggregate.label
- a human readable name for this aggregate.statsFunction
- the function to use for aggregation.public Collection<PivotFilter> getFilters()
public Collection<PivotRowSplit> getRowSplits()
public Collection<PivotColumnSplit> getColumnSplits()
public Collection<PivotCellValue> getCellValues()
public Pivot pivot()
Copyright © 2022 Splunk, Inc.. All rights reserved.