use of org.pentaho.metaverse.frames.DatabaseColumnNode in project pentaho-metaverse by pentaho.
the class MetaverseValidationIT method testTableInput.
@Test
public void testTableInput() throws Exception {
TableInputStepNode tableNode = root.getTableInputStepNode();
TableInputMeta meta = (TableInputMeta) getStepMeta(tableNode);
assertNotNull(tableNode);
assertNotNull(tableNode.getDatasource(meta.getDatabaseMeta().getName()));
assertNotNull(tableNode.getDatabaseQueryNode());
assertEquals(meta.getSQL(), tableNode.getDatabaseQueryNode().getQuery());
Iterable<StreamFieldNode> outputStreamFields = tableNode.getOutputStreamFields();
Iterable<DatabaseColumnNode> databaseColumns = tableNode.getDatabaseQueryNode().getDatabaseColumns();
assertEquals(getIterableSize(outputStreamFields), getIterableSize(databaseColumns));
}
Aggregations