This page outlines examples that show the result of converting the source value and data type to a specific BSON data type using customized fields.
Behavior
Migration job errors result in
BsonNullvalues for the impacted fields. Your field's null handling strategy does not affect this behavior.Your migration job continues with errors unless it reaches the threshold that you defined when you created the migration job.
When defining Calculated Fields and Customize ID Fields, Relational Migrator shows an initial data type of default. When you run a migration job, Relational Migrator updates this data type.
Integer
The following example shows results from applying data type
customization for the value 100 with an Integer data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean
The following example shows results from applying data type
customization for the value true with a Boolean data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long
The following example shows results from applying data type
customization for the value 1233140483647 with a Long data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Decimal
The following example shows results from applying data type
customization for the value 26.55 with a Decimal data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String
The following example shows results from applying data type
customization for the value "Hello" with a String data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following example shows results from applying data type
customization for the value "true" with a String data type.
Conversion Type | Conversion Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Oracle TIMESTAMP
Oracle TIMESTAMP(0-9) columns support the following BSON type
options. The example uses the source value
2025-01-01 12:34:56.123456789 with a TIMESTAMP(9) data type.
BSON Type | Behavior | Example Output |
|---|---|---|
| Truncates to millisecond precision. For
|
|
| Preserves full sub-millisecond precision as a string. |
|
| Stores milliseconds since Unix epoch as Int64. |
|
| Stores microseconds since Unix epoch as Int64. |
|
| Stores nanoseconds since Unix epoch as Int64. |
|
Oracle TIMESTAMP WITH TIME ZONE
Oracle TIMESTAMP WITH TIME ZONE columns support the following
BSON type options. The example uses the source value
2025-01-01 12:34:00.000 -05:00.
Note
In releases prior to 1.15.4, selecting Date for
TIMESTAMP WITH TIME ZONE columns stored the local time
without shifting to UTC. The updated Date (UTC) option
shifts the timestamp to UTC using the original time zone offset.
BSON Type | Behavior | Example Output |
|---|---|---|
| Stores the full timestamp including the time zone offset as a string. |
|
| Shifts the timestamp to UTC using the original time zone offset. |
|
| Stores local wall-clock time as-is in UTC, ignoring the time zone offset. |
|
| Creates two sub-fields: |
|
| Stores milliseconds since UTC-equivalent time as Int64. |
|
| Stores microseconds since UTC-equivalent time as Int64. |
|
| Stores nanoseconds since UTC-equivalent time as Int64. |
|
Oracle NUMBER
Oracle NUMBER columns support the following BSON type options.
The default BSON type depends on the column's scale (s) and
integer precision (p - s):
s > 0:Decimal(Decimal128)s <= 0and(p - s) < 10:Integer(BsonInt32)s <= 0and10 <= (p - s) < 19:Long(BsonInt64)s <= 0and(p - s) >= 19:Decimal(Decimal128)
The example uses the source value 123456789.
BSON Type | Behavior | Example Output |
|---|---|---|
| Treats 0 as false and any non-zero numeric value as true. |
|
| Interprets the NUMBER as milliseconds since the Unix epoch (1970-01-01T00:00:00Z). Large values can overflow and produce an invalid date. |
|
| Maps to BSON Decimal128. Values with more than 34 significant digits may lose precision. |
|
| Converts to BSON Double (64-bit floating point). Large or high-precision values may lose precision due to IEEE 754 rounding. |
|
| Maps to BSON Int32. Values that exceed the Int32 range result in an error. |
|
| Maps to BSON Int64. Values that exceed the Int64 range result in an error. |
|
| Preserves all digits as a string. Use when full numeric fidelity is required. |
|
Decimal128 Precision
When the source value exceeds 34 significant digits, the Decimal
mapping may lose precision. The following example uses the source
value 12345678901234567890123456789012345678 (38 significant
digits).
BSON Type | Behavior | Example Output |
|---|---|---|
| Values with more than 34 significant digits may lose precision. |
|
| Preserves all digits as a string. Use when full numeric fidelity is required. |
|
Oracle XMLTYPE
Relational Migrator maps Oracle XMLTYPE columns to BSON String,
storing the XML document as a string value.
Note
To migrate XMLTYPE columns, ensure that the xdb.jar
Oracle JDBC driver file is available.