Wednesday, November 15, 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 genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog