[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SSIS File Import by Directory

Posted on 2009-02-22
4
Medium Priority
?
302 Views
Last Modified: 2013-11-10
Experts,

I have an SSIS packae that imports a flat file into a database.  I'm wondring how I might improve it so that it can append several flat files from one directory into the same database table in one fell swoop.  These files are not named similarly, but they do have the same extension.
0
Comment
Question by:NigelRocks
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
HoggZilla earned 2000 total points
ID: 23707494
If  by append you mean combine the files into one big file before loading, sure - using DOS commands. But I would not, just use the Foreach Loop Container and loop over all o fthe files. I would guess your performance will be better using the Foreach Loop vs. combining the files together.
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 23715147
I'm using a for each loop container, but it's only reading the first file in the directory.  All I've done is create the object and point it to the directory.  What's my next step?
 
 
0
 
LVL 17

Assisted Solution

by:HoggZilla
HoggZilla earned 2000 total points
ID: 23715280
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 23715379
Not really.  I awarded points the last time we visited this because I'm tired of being harassed by this site every time I have a question that's 5 seconds overdue.  I wondered if this would be different because I was not going to give the files any name, nor was I going to use any variables.
The short answer is that you set up the container, point to a directory with the files, and then drag and drop a data flow task into the container that writes one of the files into a table.  
For someone new to this paradigm, describing setting up a data flow task inside the container would lead many to double-click the container and look for prompts that allow this.  I realize now this is not the case.
I have it working fine with the simple drag and drop steps outlined above.  Where do variables come in?  I didn't see any reason to set up any variables.
 
 
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

872 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