Search in sources :

Example 56 with RowMeta

use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.

the class JmsConsumerMeta method getRowMeta.

public RowMeta getRowMeta(String s, VariableSpace variableSpace) {
    RowMeta rowMeta = new RowMeta();
    rowMeta.addValueMeta(new ValueMetaString("message"));
    return rowMeta;
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMeta(org.pentaho.di.core.row.RowMeta)

Example 57 with RowMeta

use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.

the class JmsDelegate method getRowMeta.

/**
 * Creates a rowMeta for output field names
 */
RowMetaInterface getRowMeta() {
    RowMeta rowMeta = new RowMeta();
    rowMeta.addValueMeta(new ValueMetaString(messageField));
    rowMeta.addValueMeta(new ValueMetaString(destinationField));
    return rowMeta;
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMeta(org.pentaho.di.core.row.RowMeta)

Example 58 with RowMeta

use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.

the class MQTTConsumerMeta method getRowMeta.

@Override
public RowMeta getRowMeta(String origin, VariableSpace space) {
    RowMeta rowMeta = new RowMeta();
    rowMeta.addValueMeta(new ValueMetaString(msgOutputName));
    rowMeta.addValueMeta(new ValueMetaString(topicOutputName));
    return rowMeta;
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMeta(org.pentaho.di.core.row.RowMeta)

Example 59 with RowMeta

use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.

the class XMLInputSax method processRow.

public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
    if (first) {
        first = false;
        data.outputRowMeta = new RowMeta();
        meta.getFields(data.outputRowMeta, getStepname(), null, null, this, repository, metaStore);
        // For String to <type> conversions, we allocate a conversion meta data row as well...
        // 
        data.convertRowMeta = data.outputRowMeta.cloneToType(ValueMetaInterface.TYPE_STRING);
    }
    Object[] outputRowData = getRowFromXML();
    if (outputRowData == null) {
        // signal end to receiver(s)
        setOutputDone();
        // This is the end of this step.
        return false;
    }
    if (log.isRowLevel()) {
        logRowlevel("Read row: " + data.outputRowMeta.getString(outputRowData));
    }
    putRow(data.outputRowMeta, outputRowData);
    // 
    if (meta.getRowLimit() > 0 && data.rownr >= meta.getRowLimit()) {
        setOutputDone();
        return false;
    }
    return true;
}
Also used : RowMeta(org.pentaho.di.core.row.RowMeta)

Example 60 with RowMeta

use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.

the class SalesforceUpdateMetaTest method testGetFields.

@Test
public void testGetFields() throws KettleStepException {
    SalesforceUpdateMeta meta = new SalesforceUpdateMeta();
    meta.setDefault();
    RowMetaInterface r = new RowMeta();
    meta.getFields(r, "thisStep", null, null, new Variables(), null, null);
    assertEquals(0, r.size());
    r.clear();
    r.addValueMeta(new ValueMetaString("testString"));
    meta.getFields(r, "thisStep", null, null, new Variables(), null, null);
    assertEquals(1, r.size());
    assertEquals(ValueMetaInterface.TYPE_STRING, r.getValueMeta(0).getType());
    assertEquals("testString", r.getValueMeta(0).getName());
}
Also used : Variables(org.pentaho.di.core.variables.Variables) ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMeta(org.pentaho.di.core.row.RowMeta) RowMetaInterface(org.pentaho.di.core.row.RowMetaInterface) SalesforceMetaTest(org.pentaho.di.trans.steps.salesforce.SalesforceMetaTest) Test(org.junit.Test)

Aggregations

RowMeta (org.pentaho.di.core.row.RowMeta)540 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)280 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)249 ValueMetaInterface (org.pentaho.di.core.row.ValueMetaInterface)209 Test (org.junit.Test)174 ValueMetaInteger (org.pentaho.di.core.row.value.ValueMetaInteger)135 KettleException (org.pentaho.di.core.exception.KettleException)112 ArrayList (java.util.ArrayList)68 KettleStepException (org.pentaho.di.core.exception.KettleStepException)56 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)52 ValueMetaDate (org.pentaho.di.core.row.value.ValueMetaDate)44 ValueMetaNumber (org.pentaho.di.core.row.value.ValueMetaNumber)41 RowSet (org.pentaho.di.core.RowSet)34 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)27 ValueMetaBase (org.pentaho.di.core.row.value.ValueMetaBase)26 SQLException (java.sql.SQLException)24 FileObject (org.apache.commons.vfs2.FileObject)24 ValueMetaBoolean (org.pentaho.di.core.row.value.ValueMetaBoolean)23 StepMeta (org.pentaho.di.trans.step.StepMeta)23 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)23