Formatting Query Functions
LogScale's formatting functions allow different data types to be formatted and manipulated, either for further processing or make things more human-readable.
Table: Formatting Query Functions
| Function | Default Argument | Availability | Description |
|---|---|---|---|
default(field, [replaceEmpty], value) | value | Â | Creates a field to given parameter and given value. |
format([as], field, format, [timezone]) | format | Â | Formats a string using printf-style. |
formatDuration([as], field, [from], [precision]) | field | Â | Formats a duration into a more readable string. |
formatTime(as, [field], format, [locale], [timezone], [unit]) | format | Â |
Formats a string according to strftime().
|
json:prettyPrint([as], [field], [step], [strict]) | field | Â | More readable output to a JSON field. |
lower([as], field, [locale], [type]) | field | Â | Changes text of a given string field to lower case letters. |
lowercase(field, [include], [locale]) | field | Â | Changes field name or content to lowercase for parsers. |
upper([as], field, [locale]) | field | Â | Changes contents of a string field to upper case letters. |
urlDecode([as], field) | field | Â | URL-decodes the contents of a string field. |
urlEncode([as], field, [type]) | field | Â | URL encodes the contents of a string field. |
writeJson([as], [field]) | field | Â | Writes data, including fields, as a JSON object. |