Java Code Examples for org.pentaho.di.core.row.ValueMetaInterface#STORAGE_TYPE_BINARY_STRING
The following examples show how to use
org.pentaho.di.core.row.ValueMetaInterface#STORAGE_TYPE_BINARY_STRING .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StreamLookupTest.java From pentaho-kettle with Apache License 2.0 | 6 votes |
private RowSet mockDataRowSet( boolean binary ) { final int storageType = binary ? ValueMetaInterface.STORAGE_TYPE_BINARY_STRING : ValueMetaInterface.STORAGE_TYPE_NORMAL; Object[][] data = { { "Name1", "1" }, { "Name2", "2" } }; if ( binary ) { convertDataToBinary( data ); } RowSet dataRowSet = smh.getMockInputRowSet( data ); RowMeta dataRowMeta = new RowMeta(); ValueMetaString valueMeta = new ValueMetaString( "Name" ); valueMeta.setStorageType( storageType ); valueMeta.setStorageMetadata( new ValueMetaString() ); dataRowMeta.addValueMeta( valueMeta ); ValueMetaString idMeta = new ValueMetaString( "Id" ); idMeta.setStorageType( storageType ); idMeta.setStorageMetadata( new ValueMetaString() ); dataRowMeta.addValueMeta( idMeta ); doReturn( dataRowMeta ).when( dataRowSet ).getRowMeta(); return dataRowSet; }
Example 2
Source File: StreamLookupTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
private RowSet mockLookupRowSet( boolean binary ) { final int storageType = binary ? ValueMetaInterface.STORAGE_TYPE_BINARY_STRING : ValueMetaInterface.STORAGE_TYPE_NORMAL; Object[][] data = { { "Value1", "1" }, { "Value2", "2" } }; if ( binary ) { convertDataToBinary( data ); } RowSet lookupRowSet = smh.getMockInputRowSet( data ); doReturn( "Lookup" ).when( lookupRowSet ).getOriginStepName(); doReturn( "StreamLookup" ).when( lookupRowSet ).getDestinationStepName(); RowMeta lookupRowMeta = new RowMeta(); ValueMetaString valueMeta = new ValueMetaString( "Value" ); valueMeta.setStorageType( storageType ); valueMeta.setStorageMetadata( new ValueMetaString() ); lookupRowMeta.addValueMeta( valueMeta ); ValueMetaString idMeta = new ValueMetaString( "Id" ); idMeta.setStorageType( storageType ); idMeta.setStorageMetadata( new ValueMetaString() ); lookupRowMeta.addValueMeta( idMeta ); doReturn( lookupRowMeta ).when( lookupRowSet ).getRowMeta(); return lookupRowSet; }