1

I am using VS2015,I have input as a flat file which doesn't have headers.I need to add the multiple columns that is all most more than 200 columns as flat file header.Basically how we can do is we will open FLAT FILE CONNECTION MANAGER and will go to ADVANCED tab and will add the columns one by one.But adding more than 200 columns will take more time.

My question is how to add all the columns headers in to ADVANCED at once so that it can reduce a lot of time for me? Is there any solution for this or we need to add it one by one which will take long time?Is there any solution for this?

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • The best solution is to create a staging table in destination which has same column output as flat file and insert into actual table from staging – Ven Jan 22 '18 at 09:08
  • But in staging table also we need to map make column to column mapping.Is it possible to add all the columns names at once to flat file connection manager. – Hemanth aks Jan 29 '18 at 07:10
  • once you create table from ssis destination, all columns will be automatically mapped without manual mapping – Ven Jan 29 '18 at 10:53
  • Before asking your first question, it is good to read the [Tour Page](http://www.stackoverflow.com/Tour) to learn more about asking good questions, answering, accepting answers, and other rules – Hadi Jan 29 '18 at 23:15
  • @BHouse i think the most simpler method is to create a comma separated flat file and write the header manually then choose it in the flat file connection manager and after defining metadata select the original file and choose to keep the metadata. **OR go BIML** – Hadi Jan 29 '18 at 23:16

1 Answers1

1

Create a flat file with no data

As a workaround, create a comma separated flat file and write the header manually then choose it in the flat file connection manager and after defining metadata select the original file and choose to keep the metadata. (Writing in flat file is more easier from writing in Flat File Connection Manager)

You can achieve this using BIML

With BIML it is easier to create files dynamically, you can refer to the following link for more details:

Hadi
  • 36,233
  • 13
  • 65
  • 124