.createHBaseValueMetaInterface( null, mapping.getKeyName(), "dummy", ValueMetaInterface.TYPE_INTEGER, 0, 0 ); m_tupleColsFromAliasMap.add( keyMeta );
if ( resultMapping.getKeyName().equals( alias ) ) { throw new IOException( "Error in mapping. Column \"" + newMeta.getAlias() + "\" has the same name as the table key (" + resultMapping.getKeyName() + ")" ); } else { resultCols.put( newMeta.getAlias(), newMeta );
m_keyIndex = outputRowMeta.indexOfValue( mapping.getKeyName() ); m_familyIndex = outputRowMeta.indexOfValue( Mapping.TupleMapping.FAMILY.toString() ); m_colNameIndex = outputRowMeta.indexOfValue( Mapping.TupleMapping.COLUMN.toString() );
@Override public void getFields( RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space ) throws KettleStepException { rowMeta.clear(); // start afresh - eats the input if ( m_mapping != null ) { int kettleType; if ( m_mapping.getKeyType() == Mapping.KeyType.DATE || m_mapping.getKeyType() == Mapping.KeyType.UNSIGNED_DATE ) { kettleType = ValueMetaInterface.TYPE_DATE; } else if ( m_mapping.getKeyType() == Mapping.KeyType.STRING ) { kettleType = ValueMetaInterface.TYPE_STRING; } else if ( m_mapping.getKeyType() == Mapping.KeyType.BINARY ) { kettleType = ValueMetaInterface.TYPE_BINARY; } else { kettleType = ValueMetaInterface.TYPE_INTEGER; } ValueMetaInterface keyMeta = new ValueMeta( m_mapping.getKeyName(), kettleType ); keyMeta.setOrigin( origin ); rowMeta.addValueMeta( keyMeta ); // Add the rest of the fields in the mapping Map<String, HBaseValueMetaInterface> mappedColumnsByAlias = m_mapping.getMappedColumns(); Set<String> aliasSet = mappedColumnsByAlias.keySet(); for ( String alias : aliasSet ) { HBaseValueMetaInterface columnMeta = mappedColumnsByAlias.get( alias ); columnMeta.setOrigin( origin ); rowMeta.addValueMeta( columnMeta ); } } }
String mappingName = theMapping.getMappingName(); Map<String, HBaseValueMetaInterface> mapping = theMapping.getMappedColumns(); String keyName = theMapping.getKeyName(); Mapping.KeyType keyType = theMapping.getKeyType(); boolean isTupleMapping = theMapping.isTupleMapping();
ValueMetaInterface keyMeta = new ValueMeta( m_cachedMapping.getKeyName(), kettleType );
int keyIndex = outputRowMeta.indexOfValue( tableMapping.getKeyName() ); outputRowData[keyIndex] = decodedKey;
Map<String, HBaseValueMetaInterface> columnMapping ) throws KettleException { String keyName = tupleMapping.getKeyName(); keyIndex = inputRowMeta.indexOfValue( keyName ); if ( keyIndex < 0 ) {
m_keyName = current.getKeyName(); m_keyType = current.getKeyType(); m_keyInfo.setText( "HBase Key: " + m_keyName + " (" + m_keyType.toString() + ")" );
String inName = vm.getName(); if ( m_tableMapping.getKeyName().equals( inName ) ) { incomingKey = true; m_incomingKeyIndex = i; "HBaseOutput.Error.TableKeyNotPresentInIncomingFields", m_tableMapping.getKeyName(), m_tableMapping .getMappingName() ) ); errorDescriptions = BaseMessages.getString( HBaseOutputMeta.PKG, "HBaseOutput.Error.ErrorCreatingDelete" ); putError( getInputRowMeta(), r, 1, errorDescriptions, m_tableMapping.getKeyName(), "HBaseOutput004" ); BaseMessages.getString( HBaseOutputMeta.PKG, "HBaseOutput.Error.IncomingRowHasNullKeyValue" ); if ( getStepMeta().isDoingErrorHandling() ) { String errorFields = m_tableMapping.getKeyName(); putError( getInputRowMeta(), r, 1, errorDescriptions, errorFields, "HBaseOutput001" );
if ( !Utils.isEmpty( mapping.getKeyName() ) ) { keyItem.setText( 1, mapping.getKeyName() );
if ( m_tableMapping == null || Const.isEmpty( m_tableMapping.getKeyName() ) ) { throw new KettleException( BaseMessages.getString( PKG, "HBaseRowDecoder.Error.NoMappingInfo" ) );
.createHBaseValueMetaInterface( null, null, m_tableMapping.getKeyName(), getKettleTypeByKeyType( m_tableMapping.getKeyType() ), -1, -1 ); vm2.setKey( true );