Extracting schema from a connection manager

  • 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

    [p]
    [/p]

  • 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.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply