How to check if a particular column exists in flat file source in SSIS

I have to process few flat files to insert their data in one table in one database. But there is one particular column (LastPromotionDate) that may exist in few of the files but not in all. Now for files where it is existing, its value is to be inserted in corresponding column LastPromotionDate in the destination table. But for files where it is not existing, I have to use some variable value as input to the corresponding column LastPromotionDate in the destination table. Is it possible? If YES then how, which type of transformation to be used and how?
LVL 12
sachitjainAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Bhavesh ShahConnect With a Mentor Lead AnalysistCommented:
0
 
sachitjainAuthor Commented:
Hi Brichsoft,

The link provided by you talks about existence of file at a particular path but not existence of particular column in the file.
0
 
Alpesh PatelConnect With a Mentor Assistant ConsultantCommented:
Hi

Fist check the source using normal file read of headers
or
DAta profiling task you just check.


If column not exists then do with one data flow and file source where column is not exist.
else other dataflow in that file source has column.

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9495-Data-Profiling-Task-to-Validate-data-before-load-to-EDW.html
0
 
sachitjainAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.