IBM Streams 4.2

Column element

The <column> element specifies information about a database management system (DBMS) table column from an external data service.

The <column> element has four possible attributes:
  • key:
    • The key attribute specifies whether the attribute is a key field in the table. This attribute is optional. If specified, the only valid value is true. This attribute is only used for the DB2SplitDB operator and is ignored for all other operators.
  • length
    • The value of the length attribute specifies the maximum length of the DBMS table column. A subset of the column types require that you specify the length attribute. If the length attribute is specified for other column types, it is ignored.
    • If the length value specified is smaller than the size of the database column, or if the SPL data from an input stream attribute is larger than the length value specified for its corresponding table column, the data is truncated.
  • name:
    • The value of the name attribute specifies the identifier by which a table column is known in an external data service. The Database Toolkit operators use these identifiers exactly as specified to access data in the external service. For example, the operators do not change the case of the identifiers. This attribute is required.
  • type:
    • The value of the type attribute specifies the data type of the column in the DBMS table. The valid values for this attribute depend on the type of external data service that is used (for example, ODBC). This attribute is required.
    • The following list contains the supported SQL data types that can be used in the access specifications for NetezzaLoad, NetezzaPrepareLoad, ODBCAppend, ODBCEnrich, ODBCRun, ODBCSource, DB2SplitDB, and DB2PartitionedAppend operators. It also lists the corresponding allowable SPL types for each SQL type.
      • SQL types:
        • CHAR:
          • SPL type: rstring, boolean, xml
          • Length is required.
        • VARCHAR:
          • SPL type: rstring, boolean, xml
          • Length is required.
        • TINYINT:
          • SPL type: int8
          • Length is not required.
        • SMALLINT:
          • SPL type: int16
          • Length is not required.
        • INTEGER:
          • SPL type: int32
          • Length is not required.
        • BIGINT:
          • SPL type: int64
          • Length is not required.
        • REAL:
          • SPL type: float32
          • Length is not required.
        • DOUBLE:
          • SPL type: float64
          • Length is not required.
        • XML:
          • SPL type: xml
          • Length is required.
    • Note:
      • SPL type boolean maps to a CHAR or VARCHAR column with a length of exactly 1, and values of 0 (false) or 1 (true).
      • SPL type xml, when mapped to a CHAR or VARCHAR column type, is converted to or from UTF-8 character data when writing to or reading from the DBMS table.
      • The XML column type is only supported when you are using a DB2 database that is running DB2 Version 9.7 or later.