Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS task integer not redirect from varchar column as bad data

enter image description here

I am doing SSIS Error Handling. In excel file source have four columns id,name,department,salary. Id and salary (integer column are fine detect varchar datatype and redirect into bad data entry) but name and department(varchar column consider integer and string both values in good data table)?

We want redirect integer values from name and department column to bad data entry

In data conversion transformation configure error output tab to "Redirect" all four rows.Integer datatype (Id and Salary) working fine throw var-char value into bad data table but Va-char datatype column (Name and department) do not throw integer value into bad data table .

enter image description here

Could any one please help me this issue?

enter image description here

like image 436
Ankush Avatar asked Dec 08 '25 05:12

Ankush


1 Answers

Open the Data Conversion Transformation editor, Go to Configure Error Output and set the error handling option to Redirect Row.

For more information, you can refer to the following articles:

  • Error Handling in SSIS
  • Configure an Error Output in a Data Flow Component
  • ERROR HANDLING IN SSIS WITH AN EXAMPLE STEP BY STEP

Update 1

If you are looking to extract numeric values from varchar column you must use a derived column to check if it conatins numeric value and redirect row based on result:

  • How to achieve TRY_CONVERT functionality in SSIS?

Example

(DT_I8)[Name] == (DT_I8)[Name] ? NULL(DT_WSTR,50) : [Name] 

The error output will contains non numeric values. The main output will contains numbers.

like image 191
Hadi Avatar answered Dec 11 '25 10:12

Hadi