Solved

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

Posted on 2013-05-29
4
1,533 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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now