This Sample (7.8 KB) is an extension of the following example with additional steps to enable parameterization of the rendered file name.
-
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.
-
Write State saves the value of the parameter value, either default or parsed in during the HTTP request
-
Read State retrieves the file name value after the record processing steps
-
String Join writes the values of pfilename and filename fields, separated by ‘_’ to the outputfilename filed
-
String Add Prefix is used to append the target path to the file name
-
String Add Suffix is used to append the .xlsx file extension to the file name
-
The File Field Writer outputs the bytes to a file name specified in outputfilename
-
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