Skip to content

Commit

Permalink
docs(SPEC): mention more defaults
Browse files Browse the repository at this point in the history
I originally planned on mentioning the default for difference's columns,
but I noticed derivative and distinct nearby had some missing defaults
as well. The default values I used were pulled directly from the code
for those functions.
  • Loading branch information
mark-rushakoff committed Jan 2, 2019
1 parent 74c4a51 commit 8c9d0ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2517,12 +2517,14 @@ Derivative computes the time based difference between subsequent non null record
Derivative has the following properties:

* `unit` duration
unit is the time duration to use for the result
unit is the time duration to use for the result.
Defaults to `1s`.
* `nonNegative` bool
nonNegative indicates if the derivative is allowed to be negative.
If a value is encountered which is less than the previous value then it is assumed the previous value should have been a zero.
* `columns` list strings
columns is a list of columns on which to compute the derivative
columns is a list of columns on which to compute the derivative.
Defaults to `["_value"]`.
* `timeColumn` string
timeColumn is the column name for the time values.
Defaults to `_time`.
Expand All @@ -2545,6 +2547,7 @@ Difference has the following properties:
If a value is encountered which is less than the previous value then it is assumed the previous value should have been a zero.
* `columns` list strings
columns is a list of columns on which to compute the difference.
Defaults to `["_value"]`.

```
from(bucket: "telegraf/autogen")
Expand All @@ -2560,6 +2563,7 @@ Distinct has the following properties:

* `column` string
column the column on which to track unique values.
Defaults to `_value`.

Example:
```
Expand Down

0 comments on commit 8c9d0ad

Please sign in to comment.