udpated type conversion function definitions, added note to toDuration, resolves #315
parent
9806984919
commit
bc917a927d
|
@ -22,7 +22,7 @@ toBool()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `bool()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toBool = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => bool(v: r._value))
|
||||
|> map(fn:(r) => ({ r with _value: bool(v: r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -10,6 +10,10 @@ menu:
|
|||
weight: 501
|
||||
---
|
||||
|
||||
{{% warn %}}
|
||||
**`toDuration()` was removed in Flux 0.37.**
|
||||
{{% /warn %}}
|
||||
|
||||
The `toDuration()` function converts all values in the `_value` column to durations.
|
||||
|
||||
_**Function type:** Type conversion_
|
||||
|
@ -22,7 +26,7 @@ toDuration()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `duration()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +43,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toDuration = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => duration(v: r._value))
|
||||
|> map(fn:(r) => ({ r with _value: duration(v: r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -22,7 +22,7 @@ toFloat()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `float()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toFloat = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => float(v: r._value))
|
||||
|> map(fn:(r) => ({ r with _value: float(v: r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -22,7 +22,7 @@ toInt()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `int()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toInt = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => int(v: r._value))
|
||||
|> map(fn:(r) => ({ r with _value: int(v: r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -22,7 +22,7 @@ toString()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `string()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toString = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => string(v: r._value))
|
||||
|> map(fn:(r) => ({ r with _value: string(v: r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -22,7 +22,7 @@ toTime()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `time()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toTime = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => time(v:r._value))
|
||||
|> map(fn:(r) => ({ r with _value: time(v:r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
|
@ -22,7 +22,7 @@ toUInt()
|
|||
{{% note %}}
|
||||
To convert values in a column other than `_value`, define a custom function
|
||||
patterned after the [function definition](#function-definition),
|
||||
but replace the column in the `uint()` function with your desired column.
|
||||
but replace `_value` with your desired column.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
@ -39,7 +39,7 @@ from(bucket: "telegraf")
|
|||
```js
|
||||
toUInt = (tables=<-) =>
|
||||
tables
|
||||
|> map(fn:(r) => uint(v:r._value))
|
||||
|> map(fn:(r) => ({ r with _value: uint(v:r._value) }))
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
|
|
Loading…
Reference in New Issue