add note for matching params to drop() function
parent
4a42a4cbc4
commit
c6295402aa
|
@ -28,13 +28,19 @@ drop(fn: (column) => column =~ /usage*/)
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
Make sure `fn` parameter names match each specified parameter. To learn why, see [Match parameter names](/v2.0/reference/flux/language/data-model/#match-parameter-names).
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
### columns
|
### columns
|
||||||
|
|
||||||
Columns to be removed from the table.
|
Columns to be removed from the table.
|
||||||
Cannot be used with `fn`.
|
Cannot be used with `fn`.
|
||||||
|
|
||||||
_**Data type:** Array of strings_
|
_**Data type:** Array of strings_
|
||||||
|
|
||||||
### fn
|
### fn
|
||||||
|
|
||||||
A predicate function which takes a column name as a parameter (`column`) and returns
|
A predicate function which takes a column name as a parameter (`column`) and returns
|
||||||
a boolean indicating whether or not the column should be removed from the table.
|
a boolean indicating whether or not the column should be removed from the table.
|
||||||
Cannot be used with `columns`.
|
Cannot be used with `columns`.
|
||||||
|
@ -44,6 +50,7 @@ _**Data type:** Function_
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
##### Drop a list of columns
|
##### Drop a list of columns
|
||||||
|
|
||||||
```js
|
```js
|
||||||
from(bucket: "example-bucket")
|
from(bucket: "example-bucket")
|
||||||
|> range(start: -5m)
|
|> range(start: -5m)
|
||||||
|
@ -51,6 +58,7 @@ from(bucket: "example-bucket")
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Drop columns matching a predicate
|
##### Drop columns matching a predicate
|
||||||
|
|
||||||
```js
|
```js
|
||||||
from(bucket: "example-bucket")
|
from(bucket: "example-bucket")
|
||||||
|> range(start: -5m)
|
|> range(start: -5m)
|
||||||
|
@ -60,4 +68,5 @@ from(bucket: "example-bucket")
|
||||||
<hr style="margin-top:4rem"/>
|
<hr style="margin-top:4rem"/>
|
||||||
|
|
||||||
##### Related InfluxQL functions and statements:
|
##### Related InfluxQL functions and statements:
|
||||||
|
|
||||||
[DROP MEASUREMENT](https://docs.influxdata.com/influxdb/latest/query_language/database_management/#delete-measurements-with-drop-measurement)
|
[DROP MEASUREMENT](https://docs.influxdata.com/influxdb/latest/query_language/database_management/#delete-measurements-with-drop-measurement)
|
||||||
|
|
Loading…
Reference in New Issue