SSIS basics, flat file questions

I understand the basics on SSIS but trying to understand some nuances . . .

my task is simple - read a flat file with one column, right-trim the data, and append " } " to end of record. I've already done this successfully but have a few questions to better understand SSIS.

My flat file has a record size of 103 chars, but with spaces at the end it's 133.

When I point to this file in SSIS for a data connection, it can see the file ok (1 column), but in the Advanced tab it says "OutputColumnWidth = 50" (and InputColumnWidth = 0)
flat-file-connection.png
- why doesn't it "see" that the file size is 103 (or 133) ? I guess 50 is the default no matter what ?

- I don't understand having both "InputColumnWidth" and "OutputColumnWidth" . I just ignored "InputColumnWidth" and got my task completed.
LVL 1
Alaska CowboyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
>why doesn't it "see" that the file size is 103 (or 133)
Don't know, but make sure you have the file format and Header row delimeter correct.

>I guess 50 is the default no matter what ?
Correct.
0
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
>read a flat file with one column, right-trim the data, and append " } " to end of record.
In between your source and destination, add a Derived column task, replacing existing column, with an expression that goes like this:

TRIM(ColumnName) + "}"

Open in new window

0
 
Alaska CowboyAuthor Commented:
Jim, ok, thanks, I'm getting beyond the beginner phase . . .
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Alaska CowboyAuthor Commented:
Jim, what about this:

>>- I don't understand having both "InputColumnWidth" and "OutputColumnWidth" . I just ignored "InputColumnWidth" and got my task completed.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Don't know about that one.  I've noticed that it's set when you do a fixed with / ragged right, and usually the same values.
0
 
Alaska CowboyAuthor Commented:
Ok, I'll just keep my eyes on it to see how it's handled in different cases.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.