Wednesday, 15 November 2017

SSIS Package to read Blank data as Null values from Flat File Source

SSIS Package to convert Blank data to Null values from comma delimited Flat File Source
Scenario :
Suppose we have the Flat File source where we have few blank values as follows
In row 1 MiddleName is blank
In row 2 Last Name and Basic_Sal are blanks
In row 3 First Name and LastName are blanks

Now we read the Flat file with Data Flow task 

Now  if we view the Flat File source data in Data Viewer, it looks as follows
Here it showing (blanks) for the String columns and "0" for the numeric column.

Now our objective is to read these blanks as NULL, which can be done as follows :

1. Right click on FlatFile Source and go to "Edit" and select the option "Retain null values from source as null values in the data flow" as shown below :

2. Next Right click on FlatFile Source and go to "Show Advance Editor" >"Component
Properties" and set the "Retain Nulls" option to "True" as follows :



3. Finally view the data now in Data Viewer :
The Blank values are reading as Null.
--------------------------------------------------------------------------------------------------------
Thanks, TAMATAM ; Business Intelligence & Analytics Professional 
--------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Hi User, Thank You for Visiting My Blog. Please Post Your Feedback/Comments/Query.

Subscribe to Blog Posts by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts