jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcUtil.java
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);
    }
  }
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);
    }
  }
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.

@param batch batch of SDC records
@param schemaTableClassifier classifier to group records according to the schema and table names, resolving the
EL expressions involved.
@param recordWriters JDBC record writer cache
@param errorRecordHandler error record handler
@param perRecord indicate record or batch update
@throws StageException
Write records to potentially different schemas and tables using EL expressions and handle errors .