Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

import programatically multiple csv files into database tables (one file per each table)

$
0
0

I need to import approx. 400 files located all in a directory to a database, one destination table corresponding to each source csv. This is going to be like a onetime load. The metadata is different between each of the files. I am looking for the possibility of scripting the data flows. The destination tables are not created, so it should create destination tables based on each file name/columns as well. Tables can be named same as the file name and table columns are the same as each of the source file columns. I was looking athttp://www.techbrothersit.com/2014/10/ssis-how-to-load-files-in-different.html but this assumes the tables are already created.

1. do you have a solution containing both tables creation and import data as well (not only to import data when the destination tables are created as per my link that I showed)

2. if cannot show complete solution, how would I instantiate the data flows to read the metadata from each file and create the table structure on the database (programmatically for each table). once tables created , I can add the data import from each file as per my link.

 

Thank you,


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>