public void write ( Batch batch , ELEval tableNameEval , ELVars tableNameVars , String tableNameTemplate , LoadingCache < String , JdbcRecordWriter > recordWriters , ErrorRecordHandler errorRecordHandler , boolean perRecord ) throws StageException { Multimap < String , Record > partitions = ELUtils . partitionBatchByExpression ( tableNameEval , tableNameVars , tableNameTemplate , batch ) ; for ( String tableName : partitions . keySet ( ) ) { Iterator < Record > recordIterator = partitions . get ( tableName ) . iterator ( ) ; write ( recordIterator , tableName , recordWriters , errorRecordHandler , perRecord ) ; } }
Write records to the evaluated tables and handle errors .