add note for matching params to drop() function
parent
4a42a4cbc4
commit
c6295402aa
|
@ -28,13 +28,19 @@ drop(fn: (column) => column =~ /usage*/)
|
|||
|
||||
## 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 to be removed from the table.
|
||||
Cannot be used with `fn`.
|
||||
|
||||
_**Data type:** Array of strings_
|
||||
|
||||
### fn
|
||||
|
||||
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.
|
||||
Cannot be used with `columns`.
|
||||
|
@ -44,6 +50,7 @@ _**Data type:** Function_
|
|||
## Examples
|
||||
|
||||
##### Drop a list of columns
|
||||
|
||||
```js
|
||||
from(bucket: "example-bucket")
|
||||
|> range(start: -5m)
|
||||
|
@ -51,6 +58,7 @@ from(bucket: "example-bucket")
|
|||
```
|
||||
|
||||
##### Drop columns matching a predicate
|
||||
|
||||
```js
|
||||
from(bucket: "example-bucket")
|
||||
|> range(start: -5m)
|
||||
|
@ -60,4 +68,5 @@ from(bucket: "example-bucket")
|
|||
<hr style="margin-top:4rem"/>
|
||||
|
||||
##### Related InfluxQL functions and statements:
|
||||
|
||||
[DROP MEASUREMENT](https://docs.influxdata.com/influxdb/latest/query_language/database_management/#delete-measurements-with-drop-measurement)
|
||||
|
|
Loading…
Reference in New Issue