commit
5afb5dec07
content/v2.0/reference
flux/stdlib
built-in/transformations/aggregates
experimental
release-notes
|
@ -37,7 +37,7 @@ It then multiplies the result by 100 and returns a value between -100 and +100.
|
|||
### n
|
||||
The period or number of points to use in the calculation.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
### columns
|
||||
The columns to operate on.
|
||||
|
|
|
@ -27,7 +27,7 @@ count(column: "_value")
|
|||
The column on which to operate.
|
||||
Defaults to `"_value"`.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
## Examples
|
||||
```js
|
||||
|
|
|
@ -72,36 +72,36 @@ to include "fitted" data points in results when [`withFit`](#withfit) is set to
|
|||
### n
|
||||
The number of values to predict.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
### seasonality
|
||||
The number of points in a season.
|
||||
Defaults to `0`.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
### interval
|
||||
The interval between two data points.
|
||||
|
||||
_**Data type: Duration**_
|
||||
_**Data type:** Duration_
|
||||
|
||||
### withFit
|
||||
Return [fitted data](#fitted-model) in results.
|
||||
Defaults to `false`.
|
||||
|
||||
_**Data type: Boolean**_
|
||||
_**Data type:** Boolean_
|
||||
|
||||
### timeColumn
|
||||
The time column to use.
|
||||
Defaults to `"_time"`.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### column
|
||||
The column to operate on.
|
||||
Defaults to `"_value"`.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@ for market noise or volatility.
|
|||
### n
|
||||
The period or number of points to use in the calculation.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
### column
|
||||
The column to operate on.
|
||||
Defaults to `"_value"`.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
## Examples
|
||||
```js
|
||||
|
|
|
@ -34,7 +34,7 @@ Higher values represent a more efficient or trending market.
|
|||
### n
|
||||
The period or number of points to use in the calculation.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
## Examples
|
||||
```js
|
||||
|
|
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.addDuration()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once duration vectors are implemented.
|
||||
See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413).
|
||||
|
@ -39,11 +39,13 @@ experimental.addDuration(
|
|||
### d
|
||||
The duration to add.
|
||||
|
||||
_**Data type: Duration**_
|
||||
_**Data type:** Duration_
|
||||
|
||||
### to
|
||||
The time to add the [duration](#d) to.
|
||||
|
||||
_**Data type:** Time_
|
||||
|
||||
## Examples
|
||||
|
||||
### Add six hours to a timestamp
|
||||
|
|
|
@ -16,8 +16,8 @@ The Flux Bigtable package provides tools for working with data in
|
|||
[Google Cloud Bigtable](https://cloud.google.com/bigtable/) databases.
|
||||
|
||||
{{% warn %}}
|
||||
The Bigtable package is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The Bigtable package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/bigtable` package:
|
||||
|
|
|
@ -15,8 +15,8 @@ data source.
|
|||
_**Function type:** Input_
|
||||
|
||||
{{% warn %}}
|
||||
The `bigtable.from()` function is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The `bigtable.from()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
@ -41,19 +41,19 @@ _For more information, see the following:_
|
|||
- [Google Cloud IAM How-to guides](https://cloud.google.com/iam/docs/how-to)
|
||||
- [Setting Up Authentication for Server to Server Production Applications on Google Cloud](https://cloud.google.com/docs/authentication/production)
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### project
|
||||
The project ID of the Cloud Bigtable project to retrieve data from.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### instance
|
||||
The instance ID of the Cloud Bigtable instance to retrieve data from.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### table
|
||||
The name of the Cloud Bigtable table to retrieve data from.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
|
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.group()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once the proposed `extend` mode is sufficiently vetted.
|
||||
{{% /warn %}}
|
||||
|
|
|
@ -15,8 +15,8 @@ v2.0/tags: [functions, mqtt, package]
|
|||
Flux MQTT functions provide tools for working with Message Queuing Telemetry Transport (MQTT) protocol.
|
||||
|
||||
{{% warn %}}
|
||||
The MQTT package is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The MQTT package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/mqtt` package:
|
||||
|
|
|
@ -14,8 +14,8 @@ The `mqtt.to()` function outputs data to an MQTT broker using MQTT protocol.
|
|||
_**Function type:** Output_
|
||||
|
||||
{{% warn %}}
|
||||
The `mqtt.to()` function is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The `mqtt.to()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
@ -42,12 +42,12 @@ mqtt.to(
|
|||
### broker
|
||||
The MQTT broker connection string.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### topic
|
||||
The MQTT topic to send data to.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### message
|
||||
The message or payload to send to the MQTT broker.
|
||||
|
@ -58,50 +58,50 @@ If there are multiple output tables, it sends each table as a separate MQTT mess
|
|||
When you specify a message, the function sends the message string only (no output table).
|
||||
{{% /note %}}
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### qos
|
||||
The [MQTT Quality of Service (QoS)](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901103) level.
|
||||
Values range from `[0-2]`.
|
||||
Default is `0`.
|
||||
|
||||
_**Data type: Integer**_
|
||||
_**Data type:** Integer_
|
||||
|
||||
### clientid
|
||||
The MQTT client ID.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### username
|
||||
The username to send to the MQTT broker.
|
||||
Username is only required if the broker requires authentication.
|
||||
If you provide a username, you must provide a [password](#password).
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### password
|
||||
The password to send to the MQTT broker.
|
||||
Password is only required if the broker requires authentication.
|
||||
If you provide a password, you must provide a [username](#username).
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### name
|
||||
_(Optional)_ The name for the MQTT message.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### timeout
|
||||
The MQTT connection timeout.
|
||||
Default is `1s`.
|
||||
|
||||
_**Data type: Duration**_
|
||||
_**Data type:** Duration_
|
||||
|
||||
### timeColumn
|
||||
The column to use as time values in the output line protocol.
|
||||
Default is `"_time"`.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### tagColumns
|
||||
The columns to use as tag sets in the output line protocol.
|
||||
|
|
|
@ -15,7 +15,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.objectKeys()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
@ -33,7 +33,7 @@ experimental.objectKeys(
|
|||
### o
|
||||
The object to return keys from.
|
||||
|
||||
_**Data type: Object**_
|
||||
_**Data type:** Object_
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: Flux Prometheus package
|
||||
list_title: Prometheus package
|
||||
description: >
|
||||
The Flux Prometheus package provides functions for working with Prometheus-formatted metrics.
|
||||
Import the `experimental/prometheus` package.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: Prometheus
|
||||
parent: Experimental
|
||||
weight: 201
|
||||
v2.0/tags: [functions, prometheus, package]
|
||||
---
|
||||
|
||||
Flux Prometheus functions provide tools for working with
|
||||
[Prometheus-formatted metrics](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
|
||||
{{% warn %}}
|
||||
The Prometheus package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/prometheus` package:
|
||||
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
```
|
||||
|
||||
{{< children type="functions" show="pages" >}}
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: prometheus.scrape() function
|
||||
description: >
|
||||
The `prometheus.scrape()` function retrieves Prometheus-formatted metrics
|
||||
from a specified URL.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: prometheus.scrape
|
||||
parent: Prometheus
|
||||
weight: 301
|
||||
related:
|
||||
- /v2.0/write-data/scrape-data/scrapable-endpoints/
|
||||
---
|
||||
|
||||
The `prometheus.scrape()` function retrieves [Prometheus-formatted metrics](https://prometheus.io/docs/instrumenting/exposition_formats/)
|
||||
from a specified URL.
|
||||
The function groups metrics (including histogram and summary values) into individual tables.
|
||||
|
||||
_**Function type:** Input_
|
||||
|
||||
{{% warn %}}
|
||||
The `prometheus.scrape()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
|
||||
prometheus.scrape(
|
||||
url: "http://localhost:9999/metrics"
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### url
|
||||
The URL to scrape Prometheus-formatted metrics from.
|
||||
|
||||
_**Data type:** String_
|
||||
|
||||
## Examples
|
||||
|
||||
### Scrape Prometheus metrics and write them to InfluxDB
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
|
||||
prometheus.scrape(url: "https://example-url.com/metrics")
|
||||
|> to(
|
||||
org: "example-org",
|
||||
bucket: "example-bucket"
|
||||
)
|
||||
```
|
|
@ -22,7 +22,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.set()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
@ -40,7 +40,7 @@ An object that defines the columns and values to set.
|
|||
The key of each key-value pair defines the column name.
|
||||
The value of each key-value pair defines the column value.
|
||||
|
||||
_**Data type: Object**_
|
||||
_**Data type:** Object_
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.subDuration()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once duration vectors are implemented.
|
||||
See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413).
|
||||
|
@ -39,11 +39,13 @@ experimental.subDuration(
|
|||
### d
|
||||
The duration to subtract.
|
||||
|
||||
_**Data type: Duration**_
|
||||
_**Data type:** Duration_
|
||||
|
||||
### from
|
||||
The time to subtract the [duration](#d) from.
|
||||
|
||||
_**Data type:** Time_
|
||||
|
||||
## Examples
|
||||
|
||||
### Subtract six hours from a timestamp
|
||||
|
|
|
@ -20,7 +20,7 @@ _**Function type:** Output_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.to()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
@ -68,27 +68,27 @@ _[See the example below](#use-pivot-to-shape-data-for-experimental-to)._
|
|||
The bucket to write data to.
|
||||
`bucket` and `bucketID` are mutually exclusive.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### bucketID
|
||||
The ID of the bucket to write data to.
|
||||
`bucketID` and `bucket` are mutually exclusive.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### org
|
||||
The organization name of the specified [`bucket`](#bucket).
|
||||
Only required when writing to a different organization or a remote host.
|
||||
`org` and `orgID` are mutually exclusive.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
### orgID
|
||||
The organization ID of the specified [`bucket`](#bucket).
|
||||
Only required when writing to a different organization or a remote host.
|
||||
`orgID` and `org` are mutually exclusive.
|
||||
|
||||
_**Data type: String**_
|
||||
_**Data type:** String_
|
||||
|
||||
|
||||
## Examples
|
||||
|
|
|
@ -16,6 +16,28 @@ Though newer versions of Flux may be available, they will not be included with
|
|||
InfluxDB until the next InfluxDB v2.0 release._
|
||||
{{% /note %}}
|
||||
|
||||
## v0.50.0 [2019-10-11]
|
||||
|
||||
### Features
|
||||
- Add `experimental/prometheus` package.
|
||||
- Add a memory manager to the memory allocator.
|
||||
- Add an internal function for generating data.
|
||||
- Switch to using discarding mode for transformations.
|
||||
- Group key join on `_time`.
|
||||
|
||||
### Bug fixes
|
||||
- Require `data` parameter in `monitor.check()`.
|
||||
- Return the EOF error when reading metadata.
|
||||
- Re-add missing import.
|
||||
- Fix broken links in SPEC.
|
||||
- Return error from cache.
|
||||
- Update the `universe` package to use flux errors throughout.
|
||||
- Parse escape characters in string interpolation expressions.
|
||||
- Improve CSV error message for serialized Flux error.
|
||||
- Have the interpreter return annotated Flux errors.
|
||||
|
||||
---
|
||||
|
||||
## v0.49.0 [2019-09-24]
|
||||
|
||||
### Features
|
||||
|
|
Loading…
Reference in New Issue