Data types supported for nonrelational data sources

For most of the nonrelational data sources, you must specify the column information, including data type, when you create the nicknames to access the data source.

Some of the nonrelational wrappers create all of the columns required to access a data source. These are called fixed columns. Other wrappers let you specify some or all of the data types for the columns in the CREATE NICKNAME statement.

The following sections list the wrappers that you can specify the data types for, and the data types that the wrapper supports.

Data types supported by the Script wrapper

The following table lists the Db2® data types that the Script wrapper supports.

Table 1. Script data types that map to Db2 data types
XML data types Db2 data type
character BLOB
character CHARACTER
character CHARACTER FOR BIT DATA
character CLOB (maximum length is 5 megabytes)
date DATE
number DECIMAL
number DOUBLE
number FLOAT
integer INTEGER
number REAL
integer SMALLINT
character VARCHAR
character VARCHAR FOR BIT DATA

Data types supported by the table-structured file wrapper

The following table lists the Db2 data types that the table-structured file wrapper supports.

Table 2. Table-structured file data types that map to Db2 data types
Table-structured file data types Db2 data type
character CHARACTER
character CLOB (maximum length is 5 megabytes)
number DECIMAL
number DOUBLE
number FLOAT
integer INTEGER
number REAL
integer SMALLINT
character VARCHAR