Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Extracting schema from a connection manager


Extracting schema from a connection manager

Author
Message
RichardDouglas
RichardDouglas
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1013 Visits: 707
Hi all,

Some background:
I have an SSIS package that has been in a production environment for about a month, the essence of the package is that it reads in an extract from a 3rd party, checks for some invalid dates and checks each field to see if it would cause truncation when going into yet another 3rd party's database.


The issue:
This morning all the records failed due to an error where data could not be converted and were exported to a failure file.
The flat file connection manager input for this attribute was set as DT_STR 50 however the output in advanced editor shows the output column do be a DT_I4.

Question 1:
Would I be correct in saying that SSIS sampled the data originally whilst in development and chose DT_I4 as the output? It is possible that originally there was a 0 placeholder in the file as this attribute is a scrath attribute which is now being used for a date.

We had an issue here about a year ago where we found a legacy DTS package had sampled some data and just ignored subsequent data based on that!


Question 2:
There are 95 attributes in this flat file. is there a way that I can extract from SSIS what the schema for both the input and output columns are and run a comparison?
I don't relish the job of checking 190 attributes making sure that the data type and precision are correct. It would also help to make sure all the packages are more robust going forward.

Any help would be appreciated!

Rich

Hope this helps,
Rich



ahperez
ahperez
SSC-Addicted
SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)

Group: General Forum Members
Points: 454 Visits: 635
I wish I had a better answer for you, but the only way I have found to transfer the columns without recreating them is to hand-edit the .dtsx file using a text editor (something like Ultra Edit which is made for large complex text files) and transfering the column name and width information. However, editing the wrong lines can result in file corruption, causing the dtsx package not to load into BIDS, so make backups of the files you are editing before you start.

It is tedious, but for me not as tedious as recreating the 200 or so columns I have in the average space aligned text file using the Connenction Manager's GUI Advanced Colums editor. Once or twice a year I have to add or subtract a column and this saves me some time.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search