You can use a Derived Column transform. Add a new column int the bottom pane,
named Genedr. Use an expression like the following to assign the value for
your new Gender column-
[Salutation] == "Mr" ? 1 : [Salutation] == "Mrs" ? 2 : 3
This copes with unknown values, other than Mr or Mrs, and assigns 3. If you
are absolutely sure you will only ever have the two values you could shorten
it to-
[Salutation] == "Mr" ? 1 : 2
The key here is the conditional operator-
«boolean_test» ? «true_result» : «false_result»
"knezi" wrote:
Quote:
Got the following problem:
Source Data Column: FirstName; LastName; Salutation
Target Data Column: FirstName; LastName; Gender
The source-column <Salutation> always contains string "Mr." or "Mrs.".
In case of <Salutation> contains "Mr.", target-column <Gender> should be "1".
In case of <Salutation> contains "Mrs.", target-column <Gender> should be "2".
Which component does support this?
Thank you
Mario |