CountDistinctMetricSettings
Settings for Count Distinct Metrics.
fields
filters nullable array of Filter
Metric Filters allow defining a Metric with a subset of records from the given Data Pool. If no Metric Filters are present, all records will be included. To filter at query time, add Dimensions and use the
filters
property on thetimeSeriesInput
,counterInput
, orleaderboardInput
objects. There is no need to addfilters
to be able to filter at query time.The fields of a filter.
You can construct more complex filters using
and
andor
. For example, to construct a filter equivalent to(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{ "column": "value", "operator": "GREATER_THAN", "value": "0", "and": [{ "column": "value", "operator": "LESS_THAN_OR_EQUAL_TO", "value": "0" }], "or": [{ "column": "status", "operator": "EQUALS", "value": "confirmed" }] }
Note that
and
takes precedence overor
.filters.column non-null String
The name of the column to filter on.
filters.operator non-null FilterOperator
The operation to perform when comparing the column and filter values.
The available Filter operators.
EQUALS
Selects values that are equal to the specified value.
NOT_EQUALS
Selects values that are not equal to the specified value.
GREATER_THAN
Selects values that are greater than the specified value.
GREATER_THAN_OR_EQUAL_TO
Selects values that are greater or equal to the specified value.
LESS_THAN
Selects values that are less than the specified value.
LESS_THAN_OR_EQUAL_TO
Selects values that are less or equal to the specified value.
IS_NULL
Selects values that are null. This operator does not accept a value.
IS_NOT_NULL
Selects values that are not null. This operator does not accept a value.
filters.value nullable String
The value to compare the column to.
filters.and nullable array of Filter
Additional filters to AND with this one. AND takes precedence over OR.
filters.or nullable array of Filter
Additional filters to OR with this one. AND takes precedence over OR.
dimension non-null Dimension
The Dimension where the count distinct operation is going to be performed.
The Dimension object that represents a column in a table.
dimension.columnName non-null String
The column name it represents.
dimension.type non-null String
The column data type.
dimension.isNullable nullable Boolean
Whether the column is nullable.
dimension.stats nullable DimensionStatistics
The statistics for the dimension values. Fetching statistics incurs query costs.