public void write ( Batch batch , SchemaTableClassifier schemaTableClassifier , LoadingCache < SchemaAndTable , JdbcRecordWriter > recordWriters , ErrorRecordHandler errorRecordHandler , boolean perRecord ) throws StageException { Multimap < SchemaAndTable , Record > partitions = schemaTableClassifier . classify ( batch ) ; for ( SchemaAndTable key : partitions . keySet ( ) ) { Iterator < Record > recordIterator = partitions . get ( key ) . iterator ( ) ; write ( recordIterator , key , recordWriters , errorRecordHandler , perRecord ) ; } }
Write records to potentially different schemas and tables using EL expressions and handle errors .