|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.PivotSpecification
public class PivotSpecification
PivotSpecification represents a pivot to be done on a particular data model object. The user creates a PivotSpecification on some data model object, adds filters, row splits, column splits, and cell values, then calls the pivot method to query splunkd and get a set of SPL queries corresponding to this specification.
Method Summary | |
---|---|
PivotSpecification |
addCellValue(java.lang.String field,
java.lang.String label,
StatsFunction statsFunction)
Add an aggregate to each cell of the pivot. |
PivotSpecification |
addColumnSplit(java.lang.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(java.lang.String field,
java.lang.Integer start,
java.lang.Integer end,
java.lang.Integer step,
java.lang.Integer limit)
Add a column split on a numeric field, splitting the values into ranges. |
PivotSpecification |
addColumnSplit(java.lang.String field,
java.lang.String trueDisplayValue,
java.lang.String falseDisplayValue)
Add a column split on a boolean valued field. |
PivotSpecification |
addColumnSplit(java.lang.String field,
TimestampBinning binning)
Add a column split on a timestamp valued field. |
PivotSpecification |
addFilter(java.lang.String field,
BooleanComparison comparison,
boolean compareTo)
Add a filter on a boolean valued field. |
PivotSpecification |
addFilter(java.lang.String field,
IPv4Comparison comparison,
java.lang.String comparisonValue)
Add a filter on an IPv4 valued field. |
PivotSpecification |
addFilter(java.lang.String field,
NumberComparison comparison,
double comparisonValue)
Add a filter on a numeric field. |
PivotSpecification |
addFilter(java.lang.String field,
StringComparison comparison,
java.lang.String comparisonValue)
Add a filter on a string valued field. |
PivotSpecification |
addFilter(java.lang.String field,
java.lang.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(java.lang.String field,
java.lang.String label)
Add a row split on a numeric or string valued field, splitting on each distinct value of the field. |
PivotSpecification |
addRowSplit(java.lang.String field,
java.lang.String label,
java.lang.Integer start,
java.lang.Integer end,
java.lang.Integer step,
java.lang.Integer limit)
Add a row split on a numeric field, splitting into numeric ranges. |
PivotSpecification |
addRowSplit(java.lang.String field,
java.lang.String label,
java.lang.String trueDisplayValue,
java.lang.String falseDisplayValue)
Add a row split on a boolean valued field. |
PivotSpecification |
addRowSplit(java.lang.String field,
java.lang.String label,
TimestampBinning binning)
Add a row split on a timestamp valued field, binned by the specified bucket size. |
java.lang.String |
getAccelerationNamespace()
|
java.util.Collection<PivotCellValue> |
getCellValues()
|
java.util.Collection<PivotColumnSplit> |
getColumnSplits()
|
java.util.Collection<PivotFilter> |
getFilters()
|
java.util.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(java.lang.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(java.lang.String namespace)
Set the namespace to use for this acceleration, usually the name of a data model. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public PivotSpecification setAccelerationNamespace(java.lang.String namespace)
namespace
- a string specifying a namespcae.public PivotSpecification setAccelerationJob(java.lang.String sid)
sid
- the SID of a job.public PivotSpecification setAccelerationJob(Job job)
job
- a Job object.public java.lang.String getAccelerationNamespace()
public PivotSpecification addFilter(java.lang.String field, BooleanComparison comparison, boolean compareTo)
field
- the name of the fieldcomparison
- a comparison operator for the filtercompareTo
- the value to compare the field to
public PivotSpecification addFilter(java.lang.String field, StringComparison comparison, java.lang.String comparisonValue)
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field to
public PivotSpecification addFilter(java.lang.String field, IPv4Comparison comparison, java.lang.String comparisonValue)
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field to
public PivotSpecification addFilter(java.lang.String field, NumberComparison comparison, double comparisonValue)
field
- the name of the fieldcomparison
- a comparison operator for the filtercomparisonValue
- the value to compare the field to
public PivotSpecification addFilter(java.lang.String field, java.lang.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 aggregation
public PivotSpecification addRowSplit(java.lang.String field, java.lang.String label)
field
- name of the field to split onlabel
- a human readable name for this set of rows
public PivotSpecification addRowSplit(java.lang.String field, java.lang.String label, java.lang.Integer start, java.lang.Integer end, java.lang.Integer step, java.lang.Integer limit)
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(java.lang.String field, java.lang.String label, java.lang.String trueDisplayValue, java.lang.String falseDisplayValue)
trueDisplayValue
- the string to display in the true valued row label.falseDisplayValue
- the string to display in the false valued row label;
public PivotSpecification addRowSplit(java.lang.String field, java.lang.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 use
public PivotSpecification addColumnSplit(java.lang.String field)
field
- the field to split on.
public PivotSpecification addColumnSplit(java.lang.String field, java.lang.Integer start, java.lang.Integer end, java.lang.Integer step, java.lang.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(java.lang.String field, java.lang.String trueDisplayValue, java.lang.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(java.lang.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(java.lang.String field, java.lang.String label, StatsFunction statsFunction)
field
- the field to aggregate.label
- a human readable name for this aggregate.statsFunction
- the function to use for aggregation.generateSparkline
- should there be a sparkline generated for this aggregate.
public java.util.Collection<PivotFilter> getFilters()
public java.util.Collection<PivotRowSplit> getRowSplits()
public java.util.Collection<PivotColumnSplit> getColumnSplits()
public java.util.Collection<PivotCellValue> getCellValues()
public Pivot pivot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |