How to Retain Null Values in SSIS

Hi Guys, This post about to let you know. SSIS package to read Blank data as Null values from Flat File Source. Let’s See Following steps ——

step 1 : A source flat file has some blank fields . inside Blank fields first i’m not going to do any modification .

step 1

Step 2 : Right click on SSIS Packages , Create ” New SSIS Package ” , Drag and Drop ” Data Flow Task ” into ” Control Flow “. Next go to “Data Flow ” Designer. Drag and Drop ” Flat File Source ” inside Data Flow . Next Step ,Right Click on ” Flat File Source ” and Select ” Edit ” .

step 2

Step 3 : Click on ” Browse ” button , select the file from device . i’m selecting “export ” flat file. the format is csv .

  • Here after , you can see file path , code page , format text Qualifier . Header and row delimiters.
step 3
  • Step 4 : next steps, You can do some modification on Columns such as “Name ” , “Data Type” , “OutputColumnsWidth ” etc… Next You’ll get ” Retain null values ” , so first time , i’m going to use without selecting.
step 4

step 5 : Drag ADO NET Destination into mapping, You should give “New” Connection , select table or view . drag and drop pipelines between the columns.

step 5
  • step 6 : click on Start to execute the mapping. 5 rows going to ADO NET Destination .

step 7 : Without selecting ” Retain Null values ” blank records loaded into Destination .

Step 8 : if we select ” Retain null values from the source as null values in the data flow ” .

Step 9 : in place of Blank space, there are going to store “NULL ” .

output with selecting ” Retain Null values ” .
  • You can enable ” Retain Nulls ” using Advanced Editor for Flat File Source .

Happy Mapping. Thanks…..

Post Author: adama