From 92b95a94954aed17187cb99f96425feb9a47b892 Mon Sep 17 00:00:00 2001 From: B Tasker <88340935+btasker@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:28:26 +0100 Subject: [PATCH] feat: add example --- .../flux/v0/stdlib/influxdata/influxdb/cardinality.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md b/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md index 70e68c66f..c6c845c08 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md @@ -133,6 +133,7 @@ Default is `(r) => true`. - [Query series cardinality in a bucket](#query-series-cardinality-in-a-bucket) - [Query series cardinality in a measurement//](#query-series-cardinality-in-a-measurement) - [Query series cardinality for a specific tag](#query-series-cardinality-for-a-specific-tag) +- [Query series cardinality of Data Written In the Last 4 Hours](#query-series-cardinality-of-data-written-in-the-last-4-hours) ### Query series cardinality in a bucket @@ -168,3 +169,12 @@ influxdb.cardinality(bucket: "example-bucket", start: time(v: 1), predicate: (r) ``` + +### Query Cardinality of Data Written In the Last 4 hours +```js +import "influxdata/influxdb" + +influxdb.cardinality(bucket: "example-bucket", start: -4h) + +``` +