You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`influxdb.cardinality()` returns the series cardinality of data stored in InfluxDB.
31
+
`influxdb.cardinality()` returns the series cardinality of data retrieved from InfluxDB.
32
32
33
33
34
+
{{% note %}}
35
+
Although this function is similar to InfluxQL's [`SHOW SERIES CARDINALITY`](/influxdb/v1/query_language/spec/#show-series-cardinality),
36
+
it works in a slightly different manner.
37
+
38
+
`influxdb.cardinality()` is time bounded and reports the cardinality of data that matches the conditions passed into it rather than that of the bucket as a whole.
39
+
{{% /note %}}
40
+
34
41
35
42
##### Function type signature
36
43
@@ -107,6 +114,12 @@ The cardinality calculation excludes points that match the specified start time.
107
114
Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`.
108
115
Durations are relative to `now()`. Default is `now()`.
109
116
117
+
{{% note %}}
118
+
The default value is `now()`, so any points that have been written into the future will
119
+
not be counted unless a future `stop` date is provided.
120
+
{{% /note %}}
121
+
122
+
110
123
### predicate
111
124
112
125
Predicate function that filters records.
@@ -120,15 +133,17 @@ Default is `(r) => true`.
120
133
-[Query series cardinality in a bucket](#query-series-cardinality-in-a-bucket)
121
134
-[Query series cardinality in a measurement//](#query-series-cardinality-in-a-measurement)
122
135
-[Query series cardinality for a specific tag](#query-series-cardinality-for-a-specific-tag)
136
+
-[Query series cardinality of Data Written In the Last 4 Hours](#query-series-cardinality-of-data-written-in-the-last-4-hours)
0 commit comments