added notes about converting types on columns other than _value

pull/69/head
Scott Anderson 2019-02-21 09:02:47 -07:00
parent 111f8a2a38
commit 5544d87de2
7 changed files with 43 additions and 1 deletions

View File

@ -19,6 +19,12 @@ _**Output data type:** Boolean_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")
@ -37,5 +43,5 @@ toBool = (tables=<-) =>
```
_**Used functions:**
[map()](/v2.0/reference/flux/functions/built-in/transformations/map),
[map()](/v2.0/reference/flux/functions/built-in/transformations/map),
[bool()](/v2.0/reference/flux/functions/built-in/transformations/type-conversions/bool)_

View File

@ -19,6 +19,12 @@ _**Output data type:** Duration_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")

View File

@ -19,6 +19,12 @@ _**Output data type:** Float_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")

View File

@ -19,6 +19,12 @@ _**Output data type:** Integer_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")

View File

@ -19,6 +19,12 @@ _**Output data type:** String_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")

View File

@ -19,6 +19,12 @@ _**Output data type:** Time_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")

View File

@ -19,6 +19,12 @@ _**Output data type:** UInteger_
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.
{{% /note %}}
## Examples
```js
from(bucket: "telegraf")