Page 1 of 1

Derivation

Posted: Wed Sep 30, 2015 2:56 am
by Cutty Mark
Can someone help me with a derivation to be written in tfm stage to pass value '_' if any value exists in column A and value '/' if no value exists in column A.
:(

Posted: Wed Sep 30, 2015 6:23 am
by rkashyap
Parallel or Server job?

Assuming parallel job, see examples of null handling functions in Parallel transformer in this link. Also see this post.

Posted: Wed Sep 30, 2015 7:14 am
by chulett
:!: Let's assume Parallel and get your post into the correct forum. Starting off life in the FAQ Discussion forum wasn't it.

Cutty Mark, can you go back and edit your post to include the details the original forum didn't force you to include - O/S, Job Type, Version? Thanks.

Posted: Wed Sep 30, 2015 9:16 am
by ArndW
The transform stage for server and parallel jobs will have the same syntax for this column derivation

Code: Select all

IF (TRIM(InputLink.Column_A)='') THEN '/' ELSE '_'

Posted: Wed Sep 30, 2015 4:42 pm
by ray.wurlod
... with just a little added complexity if your definition of "does not have a value" includes the possibility of NULL.

Code: Select all

If IsNull(InputLink.Column_A) Or (Trim(InputLink.Column_A) <= ' ') Then '/' Else '_'

Reply

Posted: Thu Oct 01, 2015 1:32 am
by Cutty Mark
Thanku rkashyap. . . :)
I used IsNull() and solved it.
Its working fine

Posted: Thu Oct 01, 2015 1:40 am
by Cutty Mark
ray.wurlod wrote:... with just a little added complexity if your definition of "does not have a value" includes the possibility of NULL.
Yep. . . This is what I too tried. However, it was mentioned as 'If value doesn't exist in colomn(column_name)' . . .

So am not sure what they mean.

So waiting for the response from business side.

Thanku :)