Virtual tables

A virtual table is a set of columns that have specific names and data types. These columns describe the format of data that flows into and out of an operator. Each operator port in a data flow operator has a virtual table that defines the structure of the data coming into or leaving that port. In some cases, you can edit the virtual table; in other cases, the structure is fixed.

The code generator dictates the storage semantics for virtual tables. For example, a virtual table might be manifested as a physical table (such as a Db2 created temporary table and declared temporary table) if the code generator deems it appropriate to materialize the table in this way. As a rule, virtual tables are virtual rather than physical.

Within a data flow, virtual tables are visible in two places: in the expanded view of operator ports and in the Virtual Table page of the Properties view when a specific port is selected. To see the Virtual Table page, select the operator port first. You will see a Properties view with two pages: General and Virtual Table. The Virtual Table page offers more space to work with than the expanded port view, especially if the operator in question has several ports or the table has a large number of columns.

For some ports, you can edit the virtual table, which means you can change the column definitions or load a set of columns from a previously saved virtual table file or a table in a physical data model. For example, you can edit the input virtual table of a where condition operator. For other ports, where the virtual table format is decided by other property values or the semantics of the operator itself, you cannot edit the virtual table. For example, the output virtual table of a table source is defined by the table that you select from your physical data model and must maintain that structure.

To change the output virtual table of certain operators, such as table joins, you can edit the select list in the Properties view for the operator. You do not need to edit the virtual table directly.

For example, the following partial data flow has four operators: two table sources, a where condition, and a table join.
Data flow with two table sources, one connected to a where condition and a table join, the other to the table join.
The output ports for the two table sources have virtual tables that you cannot edit; these columns must correspond to the tables that were selected from the physical data model. However, you can edit the input port for the where condition. In the following example, the input port name is selected in the where condition operator, and the associated Virtual Table page is displayed in the Properties view.
Data flow with input port selected for where condition and related virtual table displayed in Properties view.

This operator does not depend on any predefined set of input columns, so you can modify the columns that flow out of this operator as its result. By editing the virtual table for the input port, you automatically update the virtual table for the result port. The result port is updated with your changes and cannot be edited itself.

You can also edit the input ports for the join operation (in, in1), but the table join operator has its own Select List properties page where you can also modify the set of columns that will result from the join. You cannot edit the virtual table that passes out of the join into the next operator.