Selection of SSIS data types

Source: Internet
Author: User
Tags ssis

For SSIS data types, the easy-to-miss accuracy is datetime, incorrect use of data types such as Datetime,time,decimal, which can result in overflow or data loss.

DateTime of 1,variable and parameter

DateTime for Variable and parameter corresponds to Dt_dbtimestamp (datatime for SQL Server) in the format: Yyyy-mm-dd hh:mm:ss XM, for example "2016-05-19 5:41:32 PM ", only accurate to seconds.

2, conversion components

Because the conversion component cannot lose precision, there are three ways to do so: Dt_dbtimestamp,dt_dbtimestamp,dt_dbtimestampoffset.

Dt_dbtimestamp corresponds to the Datetime of SQL Server in the format "Yyyy-mm-dd Hh:mm:ss", accurate to seconds

DT_DBTIMESTAMP2 corresponds to SQL Server Datetime2 (N), with precision, which can be accurate to ss.nnnnnnn

Dt_dbtimestampoffset corresponds to SQL Server DateTimeOffset (N), with precision, which can be accurate to ss.nnnnnnn

3, the effect of type conversion on performance

The conversion of data types is done only when necessary, because the SSIS engine has to pay a price for each conversion.

If you convert a value to an unsupported data type, an additional conversion to the mapped data will be generated inside SSIS, preferably converting the data type to the data type closest to the target.

4, Choice of data type

The data flow of SSIS needs to do a lot of work in memory, eliminating the most time-consuming IO operations and making the reading, conversion, and loading performance of the readings fast. Because SSIS uses memory buffers to complete related operations, the number of rows loaded into the buffer is directly related to the width of the row, the narrower the row width, the more rows the buffer holds, and the greater the amount of data processed, the better the performance. If you want to define the data type of a large input source, you must carefully pick the data type, store and transform the data with the closest size and precision, so that the row width is not too wide, and too many data type conversions can be avoided.

Selection of SSIS data types

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.