Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 126601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:20:37+00:00 2026-05-11T05:20:37+00:00

We have written a number of SSIS packages that import data from CSV files

  • 0

We have written a number of SSIS packages that import data from CSV files using the Flat File Source.

It now seems that after these packages are deployed into production, the providers of these files may deliver files where the column order of the files changes (Don’t ask!). Currently if this happens, our packages will fail.

For example, an additional column is inserted at the beginning of each row. In this case, the flat file source continues to use the existing column order, which obviously has a detrimental effect on the transformation!

Eg. Using a trivial example, the original file has the following content :

OurReference,Client,Amount 235,MFI,20000.00 236,MS,30000.00 

The output from the flat file source is :

OurReference   Client   Amount 235            ClientA  20000.00 236            ClientB  30000.00 

Subsequently, the file delivered changes to :

OurReference,ClientReference,Client,Amount 235,A244,ClientA,20000.00 236,B222,ClientB,30000.00 

When the existing unchanged package is run against this file, the output from the flat file source is :

OurReference   Client   Amount 235            A244     ClientA,20000.00 236            B222     ClientB,30000.00 

Ideally, we would like to use a data source that will cope with this problem – ie which produces output based on the column names, instead of the column order.

Any suggestions would be welcomed!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:20:37+00:00Added an answer on May 11, 2026 at 5:20 am

    Not that I know of.

    A possibility to check for the problem in advance is to set up two different connection managers, one with a single flat row. This one can read the first row and tell if it’s OK or not and abort.

    If you want to do the work, you can take it a step further and make that flat one-field row the only connection manager, and use a script component in your flow to parse the row and assign to the columns you need later in the flow.

    As far as I know, there is no way to dynamically add columns to the flow at runtime – so all the columns you need will need to be added to the script task output. Whether they can be found and get parsed from the each line is up to you. Any ‘new’ (i.e. unanticipated) columns cannot be used. Columns which are missing you could default or throw an exception.

    A final possibility is to use the SSIS object model to modify the package before running to alter the connection manager – or even to write the entire package dynamically using the object model based on an inspection of the input file. I have done quite a bit of package generation in C# using templates and then adding information based on metadata I obtained from master files describing the mainframe files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a function that gets a given number of random records from
I have written method to load data to DB from CSV. For me it's
I have written a function that will transform a number in base 10 to
I have written a wlst script to change the log file rotation strategy from
Good Afternoon All, I have written an SSIS 2005 package that contains a conditional
I have written some code in java that will guess a number based on
I have written a code generator using CodeDom and it generates a number of
I have written a program that stores booking information in a text file in
I have written an application (using Delphi 2009) that allows a user to select
I have written a function to take in the data from a Sirit IDentity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.