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

@param batch batch of SDC records
@param tableNameEval table name EL eval
@param tableNameVars table name EL vars
@param tableNameTemplate table name template
@param recordWriters JDBC record writer cache
@param errorRecordHandler error record handler
@param perRecord indicate record or batch update
@throws StageException
Write records to the evaluated tables and handle errors .