• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

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.
0
Alaska Cowboy
Asked:
Alaska Cowboy
  • 4
  • 3
2 Solutions
 
Jim HornMicrosoft 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
 
Jim HornMicrosoft 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
 
Alaska CowboyAuthor Commented:
Jim, ok, thanks, I'm getting beyond the beginner phase . . .
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
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

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now