Numeric Type Mapping

You can apply type mapping to numeric columns of type NUMBER by using the num field of the -typeMap command-line option.

The num field accepts any one of the following values:

Values Description
0 No mapping applies; NUMBER columns in the TimesTen database retain the same type, precision, and scale as in the Oracle database.
1 This is the default value. Standard numeric mapping is performed. ttImportFromOracle maps Oracle NUMBER(p,0) columns, with explicitly specified precision and a scale of 0, to compatible native TimesTen integer types whenever possible. The mappings are as follows:

Oracle Precision (p) TimesTen Data Type
p < 5 TT_SMALLINT
p >= 5 && p < 10 TT_INTEGER
p >= 10 && p < 19 TT_BIGINT
p ≥ 19 NUMBER(p, 0)
2 ttImportFromOracle performs more aggressive type mapping for NUMBER columns.

It performs a full table scan to analyze the data in each NUMBER column and collects metrics such as the minimum and maximum values, the range of non-integral values, and the presence of negative values. Based on these metrics, it maps columns containing only integral values using the standard type mapping rules.

However, instead of using the minimum defined precision, it uses the maximum precision required by the stored data (see Padding). This mode also supports the following additional mapping:

p < 3 and no negative values - TT_TINYINT

Columns containing non-integral values are mapped to the smallest NUMBER(p,s) data type that can accommodate the stored value range (where p ≤ 38, s ≤ 38, and p + s ≤ 38). If the values exceed these limits, the column is mapped to NUMBER.