Search in sources :

Example 1 with TableInputStepNode

use of org.pentaho.metaverse.frames.TableInputStepNode 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));
}
Also used : StreamFieldNode(org.pentaho.metaverse.frames.StreamFieldNode) TableInputStepNode(org.pentaho.metaverse.frames.TableInputStepNode) TableInputMeta(org.pentaho.di.trans.steps.tableinput.TableInputMeta) DatabaseColumnNode(org.pentaho.metaverse.frames.DatabaseColumnNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TableInputMeta (org.pentaho.di.trans.steps.tableinput.TableInputMeta)1 DatabaseColumnNode (org.pentaho.metaverse.frames.DatabaseColumnNode)1 StreamFieldNode (org.pentaho.metaverse.frames.StreamFieldNode)1 TableInputStepNode (org.pentaho.metaverse.frames.TableInputStepNode)1