/** * In case of getRow, we receive data from previous steps through the input rowset. In case we split the stream, we * have to copy the data to the alternate splits: rowsets 1 through n. */ @Override public Object[] getRow() throws KettleException { return getRowHandler().getRow(); }
/** * putRowTo is used to put a row in a certain specific RowSet. * * @param rowMeta The row meta-data to put to the destination RowSet. * @param row the data to put in the RowSet * @param rowSet the RoWset to put the row into. * @throws KettleStepException In case something unexpected goes wrong */ public void putRowTo( RowMetaInterface rowMeta, Object[] row, RowSet rowSet ) throws KettleStepException { getRowHandler().putRowTo( rowMeta, row, rowSet ); }
/** * Gets the row from. * * @param rowSet the row set * @return the row from * @throws KettleStepException the kettle step exception */ public Object[] getRowFrom( RowSet rowSet ) throws KettleStepException { return getRowHandler().getRowFrom( rowSet ); }
/** * Put error. * * @param rowMeta the row meta * @param row the row * @param nrErrors the nr errors * @param errorDescriptions the error descriptions * @param fieldNames the field names * @param errorCodes the error codes * @throws KettleStepException the kettle step exception */ public void putError( RowMetaInterface rowMeta, Object[] row, long nrErrors, String errorDescriptions, String fieldNames, String errorCodes ) throws KettleStepException { getRowHandler().putError( rowMeta, row, nrErrors, errorDescriptions, fieldNames, errorCodes ); }
/** * putRow is used to copy a row, to the alternate rowset(s) This should get priority over everything else! * (synchronized) If distribute is true, a row is copied only once to the output rowsets, otherwise copies are sent to * each rowset! * * @param row The row to put to the destination rowset(s). * @throws KettleStepException */ @Override public void putRow( RowMetaInterface rowMeta, Object[] row ) throws KettleStepException { if ( rowMeta != null ) { if ( !allowEmptyFieldNamesAndTypes ) { // check row meta for empty field name (BACKLOG-18004) for ( ValueMetaInterface vmi : rowMeta.getValueMetaList() ) { if ( StringUtils.isBlank( vmi.getName() ) ) { throw new KettleStepException( "Please set a field name for all field(s) that have 'null'." ); } if ( vmi.getType() <= 0 ) { throw new KettleStepException( "Please set a value for the missing field(s) type." ); } } } } getRowHandler().putRow( rowMeta, row ); }