Move v1 package to schema package
parent
64940cd941
commit
c6f7dc8474
|
@ -1,26 +0,0 @@
|
|||
---
|
||||
title: Flux InfluxDB v1 package
|
||||
list_title: InfluxDB v1 package
|
||||
description: >
|
||||
The Flux InfluxDB v1 package provides functions for managing data from an InfluxDB v1.x
|
||||
database or structured using the InfluxDB v1 data structure.
|
||||
Import the `influxdata/influxdb/v1` package.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: InfluxDB v1
|
||||
parent: Flux standard library
|
||||
weight: 202
|
||||
influxdb/v2.0/tags: [functions, influxdb-v1, package]
|
||||
---
|
||||
|
||||
InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x
|
||||
database or structured using the InfluxDB v1 data structure.
|
||||
Import the `influxdata/influxdb/v1` package:
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
```
|
||||
|
||||
{{< children type="functions" show="pages" >}}
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: Flux InfluxDB schema package
|
||||
list_title: InfluxDB schema package
|
||||
description: >
|
||||
The Flux InfluxDB schema package provides functions for managing data from an InfluxDB v1.x
|
||||
database or structured using the InfluxDB schema data structure.
|
||||
Import the `influxdata/influxdb/schema` package.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: InfluxDB Schema
|
||||
parent: Flux standard library
|
||||
weight: 202
|
||||
influxdb/v2.0/tags: [functions, influxdb-v1, package]
|
||||
---
|
||||
|
||||
InfluxDB schema Flux functions provide tools for managing data from an InfluxDB v1.x
|
||||
database or structured using the InfluxDB v1 data structure.
|
||||
Import the `influxdata/influxdb/schema` package:
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/schema"
|
||||
```
|
||||
|
||||
{{< children type="functions" show="pages" >}}
|
|
@ -1,21 +1,21 @@
|
|||
---
|
||||
title: v1.databases() function
|
||||
description: The `v1.databases()` function returns a list of databases in an InfluxDB 1.7+ instance.
|
||||
title: schema.databases() function
|
||||
description: The `schema.databases()` function returns a list of databases in an InfluxDB 1.7+ instance.
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.databases
|
||||
parent: InfluxDB v1
|
||||
name: schema.databases
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
related:
|
||||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-databases, SHOW DATABASES in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.databases()` function returns a list of databases in an **InfluxDB 1.7+ instance**.
|
||||
The `schema.databases()` function returns a list of databases in an **InfluxDB 1.7+ instance**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.databases()
|
||||
schema.databases()
|
||||
```
|
||||
|
||||
Output includes the following columns:
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
title: v1.fieldKeys() function
|
||||
description: The `v1.fieldKeys()` function returns field keys in a bucket.
|
||||
title: schema.fieldKeys() function
|
||||
description: The `schema.fieldKeys()` function returns field keys in a bucket.
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.fieldKeys
|
||||
parent: InfluxDB v1
|
||||
name: schema.fieldKeys
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [fields]
|
||||
related:
|
||||
|
@ -12,13 +12,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.fieldKeys()` function returns field keys in a bucket.
|
||||
The `schema.fieldKeys()` function returns field keys in a bucket.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.fieldKeys(
|
||||
schema.fieldKeys(
|
||||
bucket: "example-bucket",
|
||||
predicate: (r) => true,
|
||||
start: -30d
|
||||
|
@ -50,18 +50,18 @@ _**Data type:** Duration_
|
|||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.fieldKeys(bucket: "my-bucket")
|
||||
schema.fieldKeys(bucket: "my-bucket")
|
||||
```
|
||||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
fieldKeys = (bucket, predicate=(r) => true, start=-30d) =>
|
||||
tagValues(bucket: bucket, tag: "_field", predicate: predicate, start: start)
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.tagValues](/influxdb/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues/)_
|
||||
[schema.tagValues](/influxdb/v2.0/reference/flux/stdlib/influxdb-schema/tagvalues/)_
|
|
@ -1,42 +1,43 @@
|
|||
---
|
||||
title: v1.fieldsAsCols() function
|
||||
description: The v1.fieldsAsCols() function is pivots a table and automatically aligns fields within each input table that have the same timestamp.
|
||||
title: schema.fieldsAsCols() function
|
||||
description: The schema.fieldsAsCols() function is pivots a table and automatically aligns fields within each input table that have the same timestamp.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/inputs/fromrows
|
||||
- /influxdb/v2.0/reference/flux/functions/transformations/influxfieldsascols
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/fieldsascols/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/fieldsascols/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.fieldsAsCols
|
||||
parent: InfluxDB v1
|
||||
name: schema.fieldsAsCols
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `v1.fieldsAsCols()` function is a special application of the `pivot()` function that
|
||||
The `schema.fieldsAsCols()` function is a special application of the `pivot()` function that
|
||||
automatically aligns fields within each input table that have the same timestamp.
|
||||
|
||||
_**Function type:** Transformation_
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.fieldsAsCols()
|
||||
schema.fieldsAsCols()
|
||||
```
|
||||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
from(bucket:"example-bucket")
|
||||
|> range(start: -1h)
|
||||
|> filter(fn: (r) => r._measurement == "cpu")
|
||||
|> v1.fieldsAsCols()
|
||||
|> schema.fieldsAsCols()
|
||||
|> keep(columns: ["_time", "cpu", "usage_idle", "usage_user"])
|
||||
```
|
||||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
fieldsAsCols = (tables=<-) =>
|
||||
tables
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
title: v1.measurementFieldKeys() function
|
||||
description: The `v1.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
title: schema.measurementFieldKeys() function
|
||||
description: The `schema.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.measurementFieldKeys
|
||||
parent: InfluxDB v1
|
||||
name: schema.measurementFieldKeys
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [fields]
|
||||
related:
|
||||
|
@ -12,13 +12,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
The `schema.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.measurementFieldKeys(
|
||||
schema.measurementFieldKeys(
|
||||
bucket: "example-bucket",
|
||||
measurement: "example-measurement",
|
||||
start: -30d
|
||||
|
@ -49,9 +49,9 @@ _**Data type:** Duration_
|
|||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.measurementFieldKeys(
|
||||
schema.measurementFieldKeys(
|
||||
bucket: "telegraf",
|
||||
measurement: "cpu",
|
||||
)
|
||||
|
@ -59,11 +59,11 @@ v1.measurementFieldKeys(
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
measurementFieldKeys = (bucket, measurement, start=-30d) =>
|
||||
fieldKeys(bucket: bucket, predicate: (r) => r._measurement == measurement, start: start)
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.fieldKeys](/influxdb/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys/)_
|
||||
[schema.fieldKeys](/influxdb/v2.0/reference/flux/stdlib/influxdb-schema/fieldkeys/)_
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: v1.measurements() function
|
||||
description: The v1.measurements() function returns a list of measurements in a specific bucket.
|
||||
title: schema.measurements() function
|
||||
description: The schema.measurements() function returns a list of measurements in a specific bucket.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/measurements/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/measurements/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.measurements
|
||||
parent: InfluxDB v1
|
||||
name: schema.measurements
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [measurements]
|
||||
related:
|
||||
|
@ -14,13 +14,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-measurements, SHOW MEASUREMENTS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.measurements()` function returns a list of measurements in a specific bucket.
|
||||
The `schema.measurements()` function returns a list of measurements in a specific bucket.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.measurements(bucket: "example-bucket")
|
||||
schema.measurements(bucket: "example-bucket")
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
@ -32,11 +32,11 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
measurements = (bucket) =>
|
||||
tagValues(bucket: bucket, tag: "_measurement")
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.tagValues()](/influxdb/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
[schema.tagValues()](/influxdb/v2.0/reference/flux/stdlib/influxdb-schema/tagvalues)_
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: v1.measurementTagKeys() function
|
||||
description: The v1.measurementTagKeys() function returns a list of tag keys for a specific measurement.
|
||||
title: schema.measurementTagKeys() function
|
||||
description: The schema.measurementTagKeys() function returns a list of tag keys for a specific measurement.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/measurementtagkeys/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/measurementtagkeys/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.measurementTagKeys
|
||||
parent: InfluxDB v1
|
||||
name: schema.measurementTagKeys
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [tags]
|
||||
related:
|
||||
|
@ -14,13 +14,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.measurementTagKeys()` function returns a list of tag keys for a specific measurement.
|
||||
The `schema.measurementTagKeys()` function returns a list of tag keys for a specific measurement.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.measurementTagKeys(
|
||||
schema.measurementTagKeys(
|
||||
bucket: "example-bucket",
|
||||
measurement: "cpu"
|
||||
)
|
||||
|
@ -40,7 +40,7 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
measurementTagKeys = (bucket, measurement) =>
|
||||
tagKeys(
|
||||
|
@ -50,4 +50,4 @@ measurementTagKeys = (bucket, measurement) =>
|
|||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.tagKeys()](/influxdb/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)_
|
||||
[schema.tagKeys()](/influxdb/v2.0/reference/flux/stdlib/influxdb-schema/tagkeys)_
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: v1.measurementTagValues() function
|
||||
description: The v1.measurementTagValues() function returns a list of tag values for a specific measurement.
|
||||
title: schema.measurementTagValues() function
|
||||
description: The schema.measurementTagValues() function returns a list of tag values for a specific measurement.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/measurementtagvalues/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/measurementtagvalues/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.measurementTagValues
|
||||
parent: InfluxDB v1
|
||||
name: schema.measurementTagValues
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [tags]
|
||||
related:
|
||||
|
@ -14,15 +14,15 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.measurementTagValues()` function returns a list of tag values for a specific measurement.
|
||||
The `schema.measurementTagValues()` function returns a list of tag values for a specific measurement.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.measurementTagValues(
|
||||
schema.measurementTagValues(
|
||||
bucket: "example-bucket",
|
||||
measurement: "cpu",
|
||||
tag: "host"
|
||||
|
@ -49,7 +49,7 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
measurementTagValues = (bucket, measurement, tag) =>
|
||||
tagValues(
|
||||
|
@ -60,4 +60,4 @@ measurementTagValues = (bucket, measurement, tag) =>
|
|||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.tagValues()](/influxdb/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
[schema.tagValues()](/influxdb/v2.0/reference/flux/stdlib/influxdb-schema/tagvalues)_
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: v1.tagKeys() function
|
||||
description: The v1.tagKeys() function returns a list of tag keys for all series that match the predicate.
|
||||
title: schema.tagKeys() function
|
||||
description: The schema.tagKeys() function returns a list of tag keys for all series that match the predicate.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/tagkeys/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/tagkeys/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.tagKeys
|
||||
parent: InfluxDB v1
|
||||
name: schema.tagKeys
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [tags]
|
||||
related:
|
||||
|
@ -14,13 +14,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.tagKeys()` function returns a list of tag keys for all series that match the [`predicate`](#predicate).
|
||||
The `schema.tagKeys()` function returns a list of tag keys for all series that match the [`predicate`](#predicate).
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.tagKeys(
|
||||
schema.tagKeys(
|
||||
bucket: "example-bucket",
|
||||
predicate: (r) => true,
|
||||
start: -30d
|
||||
|
@ -52,15 +52,15 @@ _**Data type:** Duration_
|
|||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.tagKeys(bucket: "my-bucket")
|
||||
schema.tagKeys(bucket: "my-bucket")
|
||||
```
|
||||
|
||||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
tagKeys = (bucket, predicate=(r) => true, start=-30d) =>
|
||||
from(bucket: bucket)
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: v1.tagValues() function
|
||||
description: The `v1.tagValues()` function returns a list unique values for a given tag.
|
||||
title: schema.tagValues() function
|
||||
description: The `schema.tagValues()` function returns a list unique values for a given tag.
|
||||
aliases:
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-v1/tagvalues/
|
||||
- /influxdb/v2.0/reference/flux/functions/influxdb-schema/tagvalues/
|
||||
menu:
|
||||
influxdb_2_0_ref:
|
||||
name: v1.tagValues
|
||||
parent: InfluxDB v1
|
||||
name: schema.tagValues
|
||||
parent: InfluxDB Schema
|
||||
weight: 301
|
||||
influxdb/v2.0/tags: [tags]
|
||||
related:
|
||||
|
@ -14,13 +14,13 @@ related:
|
|||
- /{{< latest "influxdb" "v1" >}}/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.tagValues()` function returns a list unique values for a given tag.
|
||||
The `schema.tagValues()` function returns a list unique values for a given tag.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.tagValues(
|
||||
schema.tagValues(
|
||||
bucket: "example-bucket",
|
||||
tag: "host",
|
||||
predicate: (r) => true,
|
||||
|
@ -58,9 +58,9 @@ _**Data type:** Duration_
|
|||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
import "influxdata/influxdb/schema"
|
||||
|
||||
v1.tagValues(
|
||||
schema.tagValues(
|
||||
bucket: "my-bucket",
|
||||
tag: "host",
|
||||
)
|
||||
|
@ -68,7 +68,7 @@ v1.tagValues(
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
package schema
|
||||
|
||||
tagValues = (bucket, tag, predicate=(r) => true, start=-30d) =>
|
||||
from(bucket: bucket)
|
Loading…
Reference in New Issue