Posted: 3/18/2010
I have a simple package where i import a text file into a table.
The text file sometimes has spaces before and after the data for each column, so i have a derived column transformation between the flat file source and oledb destination where I do an RTRIM, LTRIM for each column.
if I leave the flatFileConnectionManager (on the advanced tab) with the exact column size of my table columns, my flat file source fails since the text file coming in has columns that are longer than size i specified (due to the spaces).
SO, I changed my flatFileConnectionManager with large column sizes that do NOT match the table column sizes, but the data gets trimmed with the derived column task & everything works fine now.
What i don't like is that the OleDb destination has a warning symbol on it. Each time the package runs i get a bunch of warnings that the sizes of the columns from the flatFileConnectionManager are not in synchronization with the OleDbDestination columns.
We are all familiar with the warning, but in my case - I don't need it because I did it on purpose so that the data can flow to my derived column transformation & get trimmed & then get to the OleDB destination with the proper sizes.
Is there some sort of property that I can set to avoid all of these warnings? kind of like what 'delay validation' property does for tasks that use variables as sources etc.
(Meaning - the oleDb destination would be happy if it 'knew' what the derived column task would do, so why display the warnings)
if this is unclear, pls let me know what I should clarify.
Posted: 3/19/2010
First, you can use the Trim function to avoid using RTrim and LTrim.
You cannot get rid of the warning with delay valiadation. But you can place a data convertion transform after the derived column to create a columns with the proper length. Then map this new column to the destination column.
Warnings are okay to see on a package. It is perfectly fine to run packages with warnings. It does not hurt the performance. It can hurt performance if you add extra transforms that are not needed. But I understand the desire to run the package without warnings.