Add docs for addFieldFilter() function
Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
parent
ea21f35c9c
commit
7eaee45b43
4 changed files with 54 additions and 10 deletions
|
|
@ -9,6 +9,7 @@ or [fromBucket()](functions/fromBucket.md)
|
||||||
* [fromMeasurement()](functions/fromMeasurement.md)
|
* [fromMeasurement()](functions/fromMeasurement.md)
|
||||||
* [addAggregateWindow()](functions/addAggregateWindow.md)
|
* [addAggregateWindow()](functions/addAggregateWindow.md)
|
||||||
* [addDuplicate()](functions/addDuplicate.md)
|
* [addDuplicate()](functions/addDuplicate.md)
|
||||||
|
* [addFieldFilter()](functions/addFieldFilter.md)
|
||||||
* [addGroup()](functions/addGroup.md)
|
* [addGroup()](functions/addGroup.md)
|
||||||
* [addLimit()](functions/addLimit.md)
|
* [addLimit()](functions/addLimit.md)
|
||||||
* [addMean()](functions/addMean.md)
|
* [addMean()](functions/addMean.md)
|
||||||
|
|
|
||||||
43
docs/functions/addFieldFilter.md
Normal file
43
docs/functions/addFieldFilter.md
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Flux Query Builder Docs
|
||||||
|
|
||||||
|
## Functions » addFieldFilter()
|
||||||
|
|
||||||
|
### Parameters:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Required</th>
|
||||||
|
<th>Data type</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fields</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>array</td>
|
||||||
|
<td>
|
||||||
|
The fields you want to have a filter on.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```php
|
||||||
|
->addFieldFilter(['field1', 'field2'])
|
||||||
|
```
|
||||||
|
|
||||||
|
This will result in the following Flux function part:
|
||||||
|
|
||||||
|
```
|
||||||
|
|> filter(fn: (r) =>
|
||||||
|
r._field == "field1" or r._field == "field2"
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extra resources
|
||||||
|
|
||||||
|
* [Flux documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/filter/)
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue