Column precision and scale
Endpoints support different precision and scale for numeric fields. Some sources do not require you to specify precision and scale. AutoSync uses the following rules when creating a numeric column in the destination:
- If the source column defines precision and scale and the target supports the same values, AutoSync uses the source precision and scale for the target column.
- If the source supports negative decimal values and the target does not, AutoSync uses the
precision and scale supported by the target to avoid loss of precision.
For example, Oracle and PostgreSQL support
-99000 → 99000
, a precision and scale of(2, -3)
. Target systems without negative decimal values would normally use(5,0)
for this precision. Instead, AutoSync uses a precision of(2,-3)
, in the target, which supports-99000 → 99000
. - If the source precision and scale are larger than the destination supports, AutoSync uses the largest value available in the destination.
- If the source does not define precision and scale, AutoSync uses the target's default value for the column type.
CAUTION: When AutoSync must use the target's default value for precision and scale, be aware that synchronization can fail later if data is added to the source with more precision and scale than the target's default value. You can avoid this by setting precision and scale in the source to a value supported by the target. If the target table exists, AutoSync will detect the change and propagate it to the destination. Refer to Detect and reconcile changes for more information.
- With the exception of the MySQL target, for the
timestamp
data type, AutoSync supports up to nanoseconds.