Skip navigation links

Package org.knime.core.data

Contains the interface definitions of the DataCell and DataTable and related classes, used to store and access the actual data.

See: Description

Package org.knime.core.data Description

Contains the interface definitions of the DataCell and DataTable and related classes, used to store and access the actual data.

A DataTable is used to pass data along between nodes in the workflow.

It has rows and columns. The number of columns is fixed. The type of data stored in each column is well defined, and each column has a unique name. Each row consists of a certain number of cells (which contain the actual data) and a unique row identifier. The data in a DataTable is read-only.

A DataTable contains a DataTableSpec object which describes the structure of the table (the number of columns, the column types, etc.) and a RowIterator which allows to iterate over the rows of the table and actually access the data.

The iterator returns DataRows, that allow access to all DataCells in this row by index (the index of the column). The number of rows is usually not known in advance (not in all tables), the iterator indicates when it reaches the end of the table. As the source underlying the table could be sequential and of arbitrary size, the general DataTable interface doesn't provide any random access methods.

The DataTableSpec contains the meta information of the data table. It can be used to query the columns' name and type, and the number of columns. In addition to that it is also used to pass information along to connected successors to let them know of the structure of the table to come. So, if the successor's preparations for execution (like the settings) depend on the structure of the data table of the predecessor, it can be set up after it received the DataTableSpec.

Accessing the data in a DataTable

DataCells are of certain type, depending on the type of data appearing in the corresponding column. For each data cell type certain objects exist describing the cell's properties, capabilities and compatibilities. This is the DataCell derivative implementing DataValue, which defines how to access the value stored in the data cell.

Read more on data cells here and in the FAQ.

Default implementations of DataCells can be found in the org.knime.core.data.def package. These implementations store the value of the cell in a member of the corresponding Java data type.

DataTables could be arbitrary big, thus they shouldn't be copied or held in memory.

Skip navigation links

Copyright, 2003 - 2016. All rights reserved.
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.