Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
538 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Steps to follow when creating a new flat file in SSIS |
---|
Using an existing flat file in SSIS is straightforward, but creating a new one can be a pain - this blogs gives some steps to follow. |
In this blog
SSIS works pretty well, on the whole, but it always throws me when it comes to creating flat files (writiing to existing flat files is fine, because the column headers are already set up). So here's a quick run through to provide help for anyone who needs it!
We want to export a list of X Factor mentors to a flat file:
If you want, you can get a copy of this file here. Here's what the answer will look like:
The text file produced by the package.
This isn't the only solution, but it is one which will work. First create a package containing a data flow task as follows:
The data flow task should contain an Excel source.
Now add a Flat File destination from the Other Destinations category (using the Destination Assistant doesn't seem to work):
Double-click on this destination to add it to your data flow task.
Now connect the source to the destination:
Feed the output from the Excel workbook into this new flat file.
Double-click on this destination to configure it - it doesn't yet have a connection:
There is no flat file connection yet, not surprisingly.
Click on the New... button on the right to add a connection:
Click on this button to create a new flat file connection.
Choose the sort of flat file you want to create:
We're going to go for a simple comma-delimited flat file.
Give your connection a name (here we've called ours Link to test file) and also - more importantly - choose what you're going to call the new flat file you're creating (here we're calling it testfile.text):
You can also click on the Browse button (not shown in this diagram) to change the folder in which the file will be created.
Make sure that you choose to put column headings at the top of your flat file:
You should normally tick this box to create a first row giving the column headings.
When you click on the Columns tab, you should see the headings set up for you:
The columns MentorId and MentorName have been created for you.
Back in the Flat File editor, you can now map your columns:
Click on this tab to map your columns in the usual way.
Everything should now work normally!
Some other pages relevant to the above blog include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.