Data Conversion problem in Derived Column Transformation

  • Hi,

    I am trying to read data from excel file and populate into DB. Though one of the excel file column is expected to have NUMERIC data, some times we tend to get character data as well which I need to process and update in the Error log file.

    Now, the problem is that if there are any character data in the particular column, my package throws error saying that there is possible data truncation (since my table column is INTEGER data type. I tried to use DT_I1(column name) in the expression but could not succeed.

    Do any of you have any idea on how to handle this issue. I want my package NOT to break even if there is any character data and need to process them though the table column is INTERGER data type?

    Thanks,

    Suresh

    Regards,
    Suresh Arumugam

  • Import the column as text (make sure that you use the intermixed option in the connection string. Be careful, importing mixed data types can cause a lot of trouble. There are plenty of forum and blog posts on this subject). Then filter out the character data in a conditional split (if you want you can redirect the character rows to another flow for special handling). Finally, convert the "numeric text" rows to integers with a data conversion component.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply