ETL to Write Data to a File with Timestamp in file name

This sample (7.6 KB) shows how a timestamp can be appended to the rendered output filename.

  1. Copy the FruitSales.xlsx file to ./data/in of the Ambience/Repertoire installation path.

  2. Upload the RenderWithTimeStamp.chainset.json to the ETL module.

  3. XLSX Definition specifies the source of incoming records, replace this step with other sources of incoming data as needed.

  4. XLSX Reader processes the incoming records, replace accordingly if other definitions of incoming data are used.

  5. XLSX Writer outputs the required columns to the rendered Excel file to bytes.

  6. Timestamp Now appends the timestamp to a column named ‘Now’.

  7. Local Formatted String converts the timestamp value from ‘Now’ to a formatted defined string to be written to a column named ‘filename’.

  8. String Add Prefix is used to append the file output path and filename to the formatted string in ‘filename’

  9. String Add Suffix is used to append the .xlsx extension the value in ‘filename’

  10. The File Field Writer writes out the bytes to a file name and target path specified in the ‘filename’ field.

Refer to ETL to the entry Write Data to a File with Timestamp and Parameterized file name for the extension of this example.