DataColumnDomain Integer data type issue

I am interested in reading table contents (from previous node) column by column in my custom Node. For example: 

col1 (String)     col2(Integer)

A                        1

B                        2

.                         .

I was able to get the column (col1) data which is stored as string. For the column data (col2) which is stored as integer I got null.  Why column data type has to be a String-Value so it is possible to get it from DataColumnDomain? is there is a way to get column data with integer type?

 

 

Hi fsaad,
to access the data stored in a certain cell in a certain row, you have to cast the cell into the appropriate data value. The value to use is determined by the table’s column specs. So for a integer column, you can do the following:

for (DataRow row : inTables[0]) {
    int col2 = ((IntValue)row.getCell(1)).getIntValue();
    // ...
}

Kind regards,
Alexander