table

Display the output as text in rows and columns.
This is the default output if no other is specified.


view table -o {
   id: 'string',
   title: 'string',
   height: n,
   limit: n,
   update: 'replace|append',
   columnOrder: 'col1',...'colN',
   markdownFields: ['field1',...'fieldN']
}

or

view table -id 'string' -title 'string' -height n -limit n -update 'replace|append' -columnOrder 'col1',...'colN' -markdownFields ['field1',...'fieldN']

See Defining sink parameters for an explanation of how sink parameters can be expressed as object literals.

Parameter Description Required?
-id An identifier for this sink that serves as a handle for referencing the object in Juttle syntax; conceptually identical to a variable name No
-title The title for the user-visible output, if it has one; the value may be any valid Juttle expression that produces a string No; defaults to the name field that is present in all metrics points
-height The height in pixels of the table display before a scroll bar appears No; default is 400 pixels
-limit The maximum number of total data points to display No; defaults to the first 1000 to avoid consuming unbounded memory
-update How to display new batches of data, one of the following:
replace:
Replace the current rows with new rows.
append:
Add new rows to the end of the table.
No; default is 'append'
-columnOrder An array of field names specifying the order of the table columns from left to right. If the data stream includes unspecified fields, these are displayed to the right of the specified ones, in alphabetical order. No; default is 'time','name','value' followed by the remaining columns in alphabetical order
-markdownFields An array of fields to interpret as markdown, for example to turn certain fields into hyperlinks, as in the example below

:baby_symbol: experimental: We're still working on this feature. Try it and see what you think, then chat with us to provide feedback.

No

Example: Table with ordered columns

emit -every :0.2s: -limit 5 
| put a = count(), b = Math.random() + Math.floor(Math.random() * 10) 
| view table 
    -columnOrder 'a','b','time'

Example: Table with markdown

read stochastic -from :1 hour ago: -to :now: -source 'logs' -errp 0.10 message~'*error*'
| reduce count() by message
| put url='[google it](https://www.google.com/?gws_rd=ssl#&q=' 
    + String.replace(message, /\(|\)/g, ' ') + ')' // not to confuse markdown with ()
| sort count -desc
| view table -markdownFields ['url'] -title 'Google These Errors'