private void initGroupMeta( RowMetaInterface previousRowMeta ) throws KettleValueException { data.groupMeta = new RowMeta(); data.entryMeta = new RowMeta(); for ( int i = 0; i < data.groupnrs.length; i++ ) { ValueMetaInterface valueMeta = previousRowMeta.getValueMeta( data.groupnrs[i] ); data.groupMeta.addValueMeta( valueMeta ); ValueMetaInterface normalMeta = valueMeta.clone(); normalMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_NORMAL ); } return; }
@Override public void getFields( RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space ) { if ( value != null ) { ValueMetaInterface v = value.getValueMeta(); v.setOrigin( origin ); r.addValueMeta( v ); } }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
private void initGroupMeta( RowMetaInterface previousRowMeta ) throws KettleValueException { data.groupMeta = new RowMeta(); for ( int i = 0; i < data.groupnrs.length; i++ ) { data.groupMeta.addValueMeta( previousRowMeta.getValueMeta( data.groupnrs[ i ] ) ); } }
@Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } }
private Object[] getHashValue() throws KettleValueException { Object[] groupDataHash = new Object[groupMeta.size()]; for ( int i = 0; i < groupMeta.size(); i++ ) { ValueMetaInterface valueMeta = groupMeta.getValueMeta( i ); groupDataHash[i] = valueMeta.convertToNormalStorageType( groupData[i] ); } return groupDataHash; } }
public RowMetaInterface getParameterRow( RowMetaInterface fields ) { RowMetaInterface param = new RowMeta(); if ( fields != null ) { for ( int i = 0; i < parameterField.length; i++ ) { ValueMetaInterface v = fields.searchValueMeta( parameterField[i] ); if ( v != null ) { param.addValueMeta( v ); } } } return param; }
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { // Set the sorted properties: ascending/descending for ( int i = 0; i < fieldName.length; i++ ) { int idx = inputRowMeta.indexOfValue( fieldName[i] ); if ( idx >= 0 ) { ValueMetaInterface valueMeta = inputRowMeta.getValueMeta( idx ); valueMeta.setSortedDescending( !ascending[i] ); // TODO: add case insensivity } } }
private RowMetaInterface copyValueMetasFrom( RowMetaInterface source, int n ) { RowMeta result = new RowMeta(); for ( int i = 0; i < n; i++ ) { // don't need cloning here, // because value metas will be cloned during iterating through rows result.addValueMeta( source.getValueMeta( i ) ); } return result; }
public static Object multiply( ValueMetaInterface metaA, Object dataA, ValueMetaInterface metaB, Object dataB ) throws KettleValueException { if ( dataA == null || dataB == null ) { return null; } if ( ( metaB.isString() && metaA.isNumeric() ) || ( metaB.isNumeric() && metaA.isString() ) ) { return multiplyString( metaA, dataA, metaB, dataB ); } return multiplyNumeric( metaA, dataA, metaB, dataB ); }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data. * * @return */ private Object[] buildOneRow() throws KettleStepException { // return previous fields name Object[] outputRowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return outputRowData; }
/** * Build an empty row based on the meta-data. * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data. * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }
/** * Build an empty row based on the meta-data... * * @return */ private Object[] buildEmptyRow() { Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() ); return rowData; }