Map<String, Object> firstRow = data.get(0);
Writer writer = createWriter(exchange, firstRow, stream);
try {
boolean first = true;
writer.printHeader();
for (Map<String, Object> row : data) {
if (ignoreFirstRecord && first) {
// skip first row
first = false;
continue;