Events-csv Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
  a, , b
  a, , b


generates a data line with two values: "a" and "b", separated by a "missing value".
generates a data line with two values: <tt>"a"</tt> and <tt>"b"</tt>, separated by a "missing value".


The quoted empty strings found between commas are interpreted as empty strings. For example:
The quoted empty strings found between commas are interpreted as empty strings. For example:
Line 15: Line 15:
  a,"  ", b  
  a,"  ", b  


generates a data line with three values: "a", "  " and "b".
generates a data line with three values: <tt>"a"</tt>, <tt>"  "</tt> and <tt>"b"</tt>.


=CSV Format=
=CSV Format=

Revision as of 18:56, 28 August 2017

Internal

Tokenization

The empty strings found between commas are interpreted as "missing value". For example:

a, , b

generates a data line with two values: "a" and "b", separated by a "missing value".

The quoted empty strings found between commas are interpreted as empty strings. For example:

a,"   ", b 

generates a data line with three values: "a", " " and "b".

CSV Format

Headers can be specified in-line. A header is prefixed with '#' and specifies the fields:

# timestamp(MM/dd/yy HH:mm:ss), collection-type(string), heap-occupancy(long)

Multiple headers are supported in the CSV line stream, and the parser adjust upon receiving a header, by parsing the data lines according to the latest header seen on the stream.

Comment lines are not allowed.

CSV Field

CSV Field Specification

"timestamp", "timestamp(yy/MM/dd HH:mm:ss)", "timestamp(time:yy/MM/dd HH:mm:ss)"

"something", "something(string)"

"something(int)"

"something(long)"

"something(float)"

"something(double)"

"something(time)"