Add docs for addDuplicate and addGroup functions
This commit is contained in:
parent
a79f390531
commit
7b15bb7ad5
3 changed files with 94 additions and 1 deletions
|
|
@ -5,3 +5,4 @@
|
||||||
On this page you will find the methods you can use in the query builder.
|
On this page you will find the methods you can use in the query builder.
|
||||||
|
|
||||||
* [addAggregateWindow()](functions/addAggregateWindow.md)
|
* [addAggregateWindow()](functions/addAggregateWindow.md)
|
||||||
|
* [addDuplicate()](functions/addDuplicate.md)
|
||||||
46
docs/functions/addDuplicate.md
Normal file
46
docs/functions/addDuplicate.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Flux Query Builder Docs
|
||||||
|
|
||||||
|
## Functions » addDuplicate()
|
||||||
|
|
||||||
|
### Parameters:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Data type</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>column</td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>Column to duplicate.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>as</td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>Name to assign to the duplicate column.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```php
|
||||||
|
->addDuplicate('tag', 'tag_dup')
|
||||||
|
```
|
||||||
|
|
||||||
|
This will result in the following Flux function part:
|
||||||
|
|
||||||
|
```
|
||||||
|
|> duplicate(
|
||||||
|
column: "tag",
|
||||||
|
as: "tag_dup",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extra resources
|
||||||
|
|
||||||
|
* [Flux documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/duplicate/)
|
||||||
46
docs/functions/addGroup.md
Normal file
46
docs/functions/addGroup.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Flux Query Builder Docs
|
||||||
|
|
||||||
|
## Functions » addGroup()
|
||||||
|
|
||||||
|
### Parameters:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Data type</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>columns</td>
|
||||||
|
<td>array</td>
|
||||||
|
<td>List of columns to use in the grouping operation.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mode</td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>Grouping mode. Default is 'by'.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```php
|
||||||
|
->addGroup(['foo', 'bar'], 'by')
|
||||||
|
```
|
||||||
|
|
||||||
|
This will result in the following Flux function part:
|
||||||
|
|
||||||
|
```
|
||||||
|
|> group(
|
||||||
|
columns: ["foo", "bar"],
|
||||||
|
mode: "by"
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extra resources
|
||||||
|
|
||||||
|
* [Flux documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/group/)
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue