Skip to main content
This information is for Chronosphere Telemetry Pipeline, which is a standalone product separate from Chronosphere Observability Platform.
The decode CSV processing rule transforms log data from CSV format to JSON. Depending on whether you specify header information, the resulting JSON object includes either a set of key/value pairs or an array that splits comma-separated values into individual strings. Additionally, the resulting output always includes a string of the original CSV log data.

Configuration parameters

Use the parameters in this section to configure the . The Telemetry Pipeline web interface uses the items in the Name column to describe these parameters. Pipeline configuration files use the items in the Key column as YAML keys.
If you enable both Parse header and Preset header, the Parse header setting takes precedence. For best results, enable one setting at a time rather than using both simultaneously.

Examples

Using the decode CSV rule lets you turn CSV-stored log data into a more traditional log format for storage and analysis.

Without headers

If you don’t specify header information, this rule transforms CSV data into an array. For example, given this sample CSV data:
A processing rule with the Source key value log and the Destination key value decoded_csv returns the following result:
This rule copied each row of CSV data to the log key and used the comma-separated row values to create the decoded_csv array.

With preset headers

If you specify header information in the Preset header setting, CSV data becomes a series of key/value pairs. For example, given this sample CSV data:
A processing rule with the Source key value log, the Destination key value decoded_csv, and the Preset header value time,user,page,result returns the following result:
This rule copied each row of CSV data to the log key and assigned each row’s comma-separated values to a series of key/value pairs in decoded_csv.

With parsed headers

If you enable the Parse header setting, CSV data becomes a series of key/value pairs with keys based on the parsed header row. For example, given this sample CSV data:
A processing rule with the Source key value log, the Destination key value decoded_csv, and the Parse header value enabled returns the following result:
This rule treated the first row of CSV data as a set of headers, then created a series of key/value pairs from subsequent rows by using header names as keys. This rule also copied each row of CSV data to the log key, except for the row that contained header names. For a processing rule with the opposite effect, see encode CSV.