use of org.pentaho.di.trans.dataservice.DataServiceMeta in project pdi-dataservice-server-plugin by pentaho.
the class ParameterPushdownTest method setUp.
@Before
public void setUp() throws Exception {
optimizationMeta = new PushDownOptimizationMeta();
optimizationMeta.setType(parameterPushdown);
optimizationMeta.setStepName("OUTPUT");
dataService = new DataServiceMeta(transMeta);
dataService.setStepname("OUTPUT");
dataService.getPushDownOptimizationMeta().add(optimizationMeta);
parameterPushdown.createDefinition().setFieldName("ARTIST").setParameter("ARTIST_FIELD").setFormat("artist: \"%s\",");
parameterPushdown.createDefinition().setFieldName("ALBUM").setParameter("ALBUM_FIELD").setFormat("album: \"%s\",");
parameterPushdown.createDefinition().setFieldName("LIVE").setParameter("LIVE_FIELD");
when(executor.getServiceTransMeta()).thenReturn(transMeta);
when(executor.getParameters()).thenReturn(parameters = Maps.newHashMap());
rowMeta = new RowMeta();
rowMeta.addValueMeta(new ValueMetaString("ARTIST"));
rowMeta.addValueMeta(new ValueMetaString("ALBUM"));
rowMeta.addValueMeta(new ValueMetaBoolean("LIVE"));
}
use of org.pentaho.di.trans.dataservice.DataServiceMeta in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceResolverDelegateTest method testGetDataServiceWithNameRetNull.
@Test
public void testGetDataServiceWithNameRetNull() {
when(resolver.getDataService(DATA_SERVICE_NAME)).thenReturn(null);
DataServiceMeta returnDataServiceMeta = dataServiceResolverDelegate.getDataService(DATA_SERVICE_NAME);
assertNull(returnDataServiceMeta);
verify(resolver).getDataService(DATA_SERVICE_NAME);
}
use of org.pentaho.di.trans.dataservice.DataServiceMeta in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceResolverDelegateTest method testGetDataServiceNoResolvers.
@Test
public void testGetDataServiceNoResolvers() {
DataServiceResolverDelegate nullDataServiceResolverDelegate = new DataServiceResolverDelegate(new ArrayList<DataServiceResolver>());
DataServiceMeta returnDataServiceMeta = nullDataServiceResolverDelegate.getDataService(DATA_SERVICE_NAME);
assertNull(returnDataServiceMeta);
}
use of org.pentaho.di.trans.dataservice.DataServiceMeta in project pdi-dataservice-server-plugin by pentaho.
the class TransientResolverTest method testBuildStreamingLocalTransient.
@Test
public void testBuildStreamingLocalTransient() throws Exception {
String transientId = TransientResolver.buildTransient("/path/to/file.ktr", "streaming:local:OUTPUT");
String[] parts = transientResolver.splitTransient(transientId);
assertEquals(parts.length, 2);
DataServiceMeta dataServiceMeta = transientResolver.getDataService(transientId);
assertEquals(dataServiceMeta.getStepname(), "OUTPUT");
}
use of org.pentaho.di.trans.dataservice.DataServiceMeta in project pdi-dataservice-server-plugin by pentaho.
the class TransientResolverTest method testBuildLocalStreamingTransient.
@Test
public void testBuildLocalStreamingTransient() throws Exception {
String transientId = TransientResolver.buildTransient("/path/to/file.ktr", "local:streaming:OUTPUT");
String[] parts = transientResolver.splitTransient(transientId);
assertEquals(parts.length, 2);
DataServiceMeta dataServiceMeta = transientResolver.getDataService(transientId);
assertEquals(dataServiceMeta.getStepname(), "OUTPUT");
}
Aggregations