fieldnamesStatistics provides detailed information on the column for the input table.
Operator Usage in Easy Mode
- Click + on the parent node.
- Enter the Fieldnames Statistics operator in the search field and select the operator from the Results to open the operator form.
- In the Input Table drop-down, enter or select the table on which this operator runs to generate the statistics.
- Click Run to view the result.
- Click Save to add the operator to the playbook.
- Click Cancel to discard the operator form.
Usage Details
LQL Command
fieldnamesStatistics(inputTable: TableReference, valuesLimit:Long)
Input
- inputTable (TableReference): The table on which this operator runs to generate the statistics.
- valuesLimit (Long) (Optional): Total number of distinct values in the JSON output. The default is 100.
Output
A table containing the column names and their statistics, for example, non null count, distinct count, min, max, mean, and stdev.
Example
Input
name | ID | floatVal | IP | longVal |
---|---|---|---|---|
test | 1 | 12.32 | 12.32.43.41 | 1341235253 |
lhub | 2 | 10.5 | 10.32.43.41 | 1341230253 |
{sql}fieldnamesStatistics(table)
Output
fieldname | dataType | count | distinctCount | min | max | mean | stdev | values |
---|---|---|---|---|---|---|---|---|
name | string | 2 | 2 | NaN | NaN | NaN | NaN | [{"value":"test","count":1},{"value":"lhub","count":1}] |
ID | integer | 2 | 2 | 1.0 | 2.0 | 1.5 | 0.7071067811865476 | [{"value":"1","count":1}] |
floatVal | float | 2 | 2 | 10.5 | 12.319999694824219 | 11.40999984741211 | 1.286934125967652 | [{"value":"12.32","count":1}] |
IP | string | 2 | 2 | NaN | NaN | NaN | NaN | [{"value":"12.32.43.41","count":1},{"value":"10.32.43.41","count":1}] |
longVal | bigint | 2 | 2 | 1.341230253E9 | 1.341235253E9 | 1.341232753E9 | 3535.5339059327375 | [{"value":"1341235253","count":1}] |