anivtk
5 years agoNew Contributor II
How to add a custom Header in a file?
Hi,
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’
Requirement
- 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’
- 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
99
Row 1
Row 2
Row 3
…
…
Row 99
Any help on how can I achieve this is appreciated.
Thanks!
try attached pipeline. rowCountWriteToFile_2020_09_30.slp (13.1 KB)