Viewing sample content within data flows

When you are designing or testing a data flow, you can check whether the table defined in an operator contains expected data by viewing its sample content within the data flow.

About this task

Before you begin

  • Specify the SQL execution database for the data flow.
  • Specify the default value for the variable, if the SQL execution database is a variable.

About this task

You can view the sample content of tables associated with operators such as table source, table target, SQL merge, SCD, bulk load, and data station (station type as persistent table). This feature now eliminates the need to access the Data Source Explorer to view the sample content.

To use the data sampling feature, the data flow need not be complete; the feature works fine even for stand-alone operators on the canvas. You only need to define the source database property for the operator whose sample content you want to view. For example, to view the sample data for a data station operator of type persistent table, you need to specify the staged database table name.

If variables are used for defining schema or table names, then the variables must have default values. The default schema or table values will be used to identify the database table.

Procedure

To view sample rows of a table:

Procedure

  1. In the data flow editor, right-click an operator that is associated with a database table and select Sample Contents of Database Table.
  2. If the database connection is not set up in the Data Source Explorer view, then type the user ID and password.
    The Data Output view displays sample rows of the database table associated with the operator.
    Figure 1. Results page of the Data Output view showing the sample content of a table.
    Figure shows the Results page of the Data Output view that contains the sample content of a table.
    Tip: By default, the Data Output view displays 50 rows of the table. You can specify a higher limit by editing the settings in the Preferences window. To edit the Data Output view settings, perform these steps:
    1. In the Design Studio, click Windows > Preferences. The Preferences window opens.
    2. In the left pane of this window, click Data > Output.
    3. In the Maximum rows to retrieve field, type the number of rows to sample in the Data Output view.
      Restriction: When you retrieve rows from a Db2 database table, the Data Output view does not display more than 1000 rows, even when you have specify a value greater than 1000 in the Maximum rows to retrieve field.
    4. Click Apply.