ETL to Write Data to a File with Timestamp and Parameterized file name

This Sample (7.8 KB) is an extension of the following example with additional steps to enable parameterization of the rendered file name.

  1. Add a JSON Record, this will be the file name parameter. The default value is used if no file name is parsed in for the parameter value.

  2. Write State saves the value of the parameter value, either default or parsed in during the HTTP request

  3. Read State retrieves the file name value after the record processing steps

  4. String Join writes the values of pfilename and filename fields, separated by ‘_’ to the outputfilename filed

  5. String Add Prefix is used to append the target path to the file name

  6. String Add Suffix is used to append the .xlsx file extension to the file name

  7. The File Field Writer outputs the bytes to a file name specified in outputfilename

  8. Test the ETL chainset by parsing in a file name, e.g.
    curl -v "http://localhost:1730/etl/endpoint-bytes/RenderWithParamFileName/01_RenderWithTimeStamp?pfilename=FruitSalesReport&elx.token=468cccf2-7d9e-47a3-b753-bde00a626a26" -o nul