Solved

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

Posted on 2013-05-29
4
1,632 Views
Last Modified: 2016-02-10
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?
0
Comment
Question by:sachitjain
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Bhavesh Shah earned 300 total points
ID: 39206862
0
 
LVL 12

Author Comment

by:sachitjain
ID: 39206976
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
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 200 total points
ID: 39228060
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
 
LVL 12

Author Closing Comment

by:sachitjain
ID: 39228234
Thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Find unused columns in a table 12 96
Linked Server - SP with Param to VIew 7 29
Question about Common Table Expressions 3 45
T-SQL: need to reset a declared variable 4 33
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question