Add Timestamp field to Structured Records

This article is posted on the CDAP doc wiki and will be maintained here:

This article describes how customers can add timestamp to a structured record using Field Adder plugin. For example, you might want to add a timestamp field to every record that gets sent to an Error Collector transform.

Adding a new field to records

  1. Get the Field Adder transform from Hub.

 

2. Configure the plugin to add timestamp field. For example, to add a timestamp to a structured record, in the Field Name box, enter the name of the new field and add the logicalStartTime macro function as the Field Value:

More details about functions supported can be found here.

Â