Showing posts with label derived. Show all posts
Showing posts with label derived. Show all posts

Sunday, February 19, 2012

Data type issues

One:

I can't map in the Lookup Transformer editor from my input (a string) that has been modded using the following in the Derived Column Transformer as follows:

Formatted_Date

((DT_DATE)(SUBSTRING([IN-DT-CYMD-TRANS],5,2) + "-" + SUBSTRING([IN-DT-CYMD-TRANS],7,2) + "-" + SUBSTRING([IN-DT-CYMD-TRANS],1,4)))

database_date (DT_DBDATE)

The destination field has the data type "datetime", according to Management Studio.

Two:

I have almost the exact same problem with another mapping, trying to cast a string to an int (INT is not one of the choices in my list...):

Batch_Code_As_Int

((DT_NUMERIC,1,1)([IN-BAT-NBR]))

numeric [DT_NUMERIC]

Any thoughts?

Thanks!

Jim Work

Jim Work wrote:

One:

I can't map in the Lookup Transformer editor from my input (a string) that has been modded using the following in the Derived Column Transformer as follows:

Make your derived column type a DB_TIMESTAMP and see if that works.

Jim Work wrote:


Two:

I have almost the exact same problem with another mapping, trying to cast a string to an int (INT is not one of the choices in my list...):

Batch_Code_As_Int

((DT_NUMERIC,1,1)([IN-BAT-NBR]))

numeric [DT_NUMERIC]

Try DT_I4 (a 32-bit integer)

Friday, February 17, 2012

Data type changes

If I have a derived column in the middle of a data flow diagram and I change the derived column's data type, I have to open all of the data flow items beyond it before the change is propagated. In one case I had to remove it from a merge join and re add it before the change was acknowledged.

Is there a faster, better way?
Thanks
Jim

Jim,

This propagation of data types have to be your conscious decision. We do not want to break anything downstream by doing this.

Thanks,