How to add a custom Header in a file?


I am reading some table data from a SQL Server (‘SQL Server - Execute’ snap) and writing the output to a text file (‘File Writer’ snap) (using a ‘CSV formatter’ between he above snaps)

‘SQL Server - Execute’ --> ‘CSV formatter’ --> ‘File Writer’


  1. I don’t need the SQL column name name as the header ==> I am able to achieve this by unchecking “Write CSV header” in ‘CSV Formatter’
  2. But I need a new heading (instead of the column name) which is would be the “number of records returned by the SQL query”.

i.e. If the SQL query returns 99 records, the file should look like

Row 1
Row 2
Row 3

Row 99

Any help on how can I achieve this is appreciated.



try attached pipeline. rowCountWriteToFile_2020_09_30.slp (13.1 KB)

1 Like

This is great, met my requirements, thanks for your quick response!