Data Truncation (SSIS)
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
An expression may inadvertently cause data to be truncated. Truncation can occur under the following circumstances:
Strings. For example, translating string data with a DT_WSTR data type to the same length string, measured in characters, with a DT_STR data type causes data loss if the original string contains double-byte characters.
Significant digits. For example, casting an integer from a DT_I4 data type to a DT_I2 data type or an unsigned integer to a signed integer.
Insignificant digits. For example, casting a real number from a DT_R8 to a DT_R4 or an integer from a DT_I4 data type to a DT_R4 data type.
The expression evaluator identifies explicit casts that may cause truncation and issues a warning when the expression is parsed. For example, the expression evaluator warns you if a 30-character string is cast into a 20-character string.
Truncation is not checked at run time; data is truncated without warning. However, most data adapters and transformations support error outputs that can handle the disposition of error rows. For more information about handling truncation of data, see Error Handling in Data.