use of org.pentaho.di.core.row.value.ValueMetaNumber in project pentaho-kettle by pentaho.
the class JsonInputTest method testChildDot.
@Test
public void testChildDot() throws Exception {
final String jsonInputField = getBasicTestJson();
testSimpleJsonPath("$.store.bicycle.color", new ValueMetaString("bcol"), new Object[][] { new Object[] { jsonInputField } }, new Object[][] { new Object[] { jsonInputField, "red" } });
testSimpleJsonPath("$.store.bicycle.price", new ValueMetaNumber("p"), new Object[][] { new Object[] { jsonInputField } }, new Object[][] { new Object[] { jsonInputField, 19.95 } });
}
use of org.pentaho.di.core.row.value.ValueMetaNumber in project pentaho-kettle by pentaho.
the class BlockingStep_PDI_11344_Test method createRowMetaInterface.
private static RowMetaInterface createRowMetaInterface() {
RowMetaInterface rm = new RowMeta();
ValueMetaInterface[] valuesMeta = { new ValueMetaString("field1"), new ValueMetaInteger("field2"), new ValueMetaNumber("field3"), new ValueMetaDate("field4"), new ValueMetaBoolean("field5"), new ValueMetaBigNumber("field6"), new ValueMetaBigNumber("field7") };
for (ValueMetaInterface aValuesMeta : valuesMeta) {
rm.addValueMeta(aValuesMeta);
}
return rm;
}
use of org.pentaho.di.core.row.value.ValueMetaNumber in project pentaho-kettle by pentaho.
the class GroupByIntIT method getTestRowMetaAndData.
List<RowMetaAndData> getTestRowMetaAndData(int count, Integer[] nulls) {
List<RowMetaAndData> list = new ArrayList<RowMetaAndData>();
RowMetaInterface rm = new RowMeta();
rm.addValueMeta(new ValueMetaString(KEY1));
rm.addValueMeta(new ValueMetaInteger(KEY2));
rm.addValueMeta(new ValueMetaNumber(KEY3));
rm.addValueMeta(new ValueMetaBigNumber(KEY4));
Object[] row = new Object[4];
List<Integer> nullsList = Arrays.asList(nulls);
for (int i = 0; i < count; i++) {
if (nullsList.contains(i)) {
for (int j = 0; j < row.length; j++) {
row[j] = null;
}
} else {
row[0] = "";
row[1] = 1L;
row[2] = 2.0;
row[3] = new BigDecimal(3);
}
list.add(new RowMetaAndData(rm, row));
}
return list;
}
use of org.pentaho.di.core.row.value.ValueMetaNumber in project pentaho-kettle by pentaho.
the class JaninoStepIT method createRowMetaInterface.
public RowMetaInterface createRowMetaInterface() {
RowMetaInterface rm = new RowMeta();
ValueMetaInterface[] valuesMeta = { new ValueMetaString("string"), new ValueMetaInteger("integer"), new ValueMetaNumber("number"), new ValueMetaBigNumber("bigdecimal"), new ValueMetaDate("date"), new ValueMetaBinary("binary"), new ValueMetaBoolean("bool"), new ValueMetaTimestamp("timestamp"), new ValueMetaInternetAddress("inetaddress") };
for (int i = 0; i < valuesMeta.length; i++) {
rm.addValueMeta(valuesMeta[i]);
}
return rm;
}
use of org.pentaho.di.core.row.value.ValueMetaNumber in project pentaho-kettle by pentaho.
the class JavaScriptSpecialIT method createRowMetaInterface3.
public RowMetaInterface createRowMetaInterface3() {
RowMetaInterface rm = new RowMeta();
ValueMetaInterface[] valuesMeta = { new ValueMetaInteger("int_in"), new ValueMetaNumber("number_in"), new ValueMetaString("string_in") };
for (int i = 0; i < valuesMeta.length; i++) {
rm.addValueMeta(valuesMeta[i]);
}
return rm;
}
Aggregations