Data Type Conversion Reference
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
Sync job errors result in
BsonNull
values for the impacted fields. Your field's null handling strategy does not affect this behavior.Your sync job continues with errors unless it reaches the threshold that you defined when you created the sync job.
When defining Calculated Fields and Customize ID Fields, Relational Migrator shows an initial data type of default. When you run a sync 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 | false |
Date | Thu Jan 01 10:00:00 AEST 1970 |
Decimal | 100.0 |
Double | 100.0 |
Integer | 100 |
Long | 100 |
String | 100 |
Boolean
The following example shows results from applying data type
customization for the value true
with a Boolean
data type.
Conversion Type | Conversion Value |
---|---|
Boolean | true |
Date | Thu Jan 01 10:00:00 AEST 1970 |
Decimal | 1.0 |
Double | 1.0 |
Integer | 1 |
Long | 1 |
String | "true" |
Long
The following example shows results from applying data type
customization for the value 1233140483647
with a Long
data type.
Conversion Type | Conversion Value |
---|---|
Boolean | false |
Date | Wed Jan 28 22:01:23 AEDT 2009 |
Decimal | 1233140483647.0 |
Double | 1233140483647.0 |
Integer | Error (Too big) |
Long | 1233140483647 |
String | "1233140483647" |
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 |
---|---|
Boolean | false |
Date | Error |
Decimal | 26.55 |
Double | 26.55 |
Integer | 26 |
Long | 26 |
String | "26.55" |
String
The following example shows results from applying data type
customization for the value "Hello"
with a String
data type.
Conversion Type | Conversion Value |
---|---|
Boolean | false |
Date | Error |
Decimal | Error |
Double | Error |
Integer | Error |
Long | Error |
String | "Hello" |
The following example shows results from applying data type
customization for the value "true"
with a String
data type.
Conversion Type | Conversion Value |
---|---|
Boolean | true |
Date | Error |
Decimal | Error |
Double | Error |
Integer | Error |
Long | Error |
String | "true" |