@ Override protected void writeToOutput ( final Map < String , Object > row ) throws IOException { if ( writer == null ) { CsvMapper mapper = new CsvMapper ( ) ; mapper . disable ( SerializationFeature . CLOSE_CLOSEABLE ) ; mapper . getFactory ( ) . configure ( JsonGenerator . Feature . AUTO_CLOSE_TARGET , false ) ; CsvSchema schema = buildCsvSchema ( row ) ; writer = mapper . writer ( schema ) ; writer . writeValue ( getWriter ( ) , row . keySet ( ) ) ; } writer . writeValue ( getWriter ( ) , row . values ( ) ) ; }
Write a row to the destination .