Documentation

tickscript.compute() function

Flux 0.111.0+

The tickscript.compute() function is a user-contributed function maintained by the package author and can be updated or removed at any time.

The tickscript.compute() function is an alias for tickscript.select() that changes a column’s name and optionally applies an aggregate or selector function.

import "contrib/bonitoo-io/tickscript"

tickscript.compute(
  column: "_value",
  fn: sum,
  as: "example-name"
)

TICKscript helper function

tickscript.select() is a helper function meant to replicate TICKscript operations like the following:

// Rename
query("SELECT x AS y")

// Aggregate and rename
query("SELECT f(x) AS y")

Parameters

column

Column to operate on. Default is _value.

fn

Aggregate or selector function to apply.

as

(Required) New column name.

tables

Input data. Default is piped-forward data (<-).

Examples

For examples, see tickscript.select().

Package author and maintainer

Github: @bonitoo-io, @alespour
InfluxDB Slack: @Ales Pour


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.