Solved

SSIS basics, flat file questions

Posted on 2013-10-22
7
367 Views
Last Modified: 2016-02-11
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
Comment
Question by:Alaska Cowboy
  • 4
  • 3
7 Comments
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
ID: 39592045
>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
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 39592139
>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
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 39592143
Jim, ok, thanks, I'm getting beyond the beginner phase . . .
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 39593869
Jim, what about this:

>>- I don't understand having both "InputColumnWidth" and "OutputColumnWidth" . I just ignored "InputColumnWidth" and got my task completed.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 39593878
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
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 39593977
Ok, I'll just keep my eyes on it to see how it's handled in different cases.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 39594016
Thanks for the grade.  Good luck with your project.  -Jim
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now