0

In derivedfield in pmml, for making local transformation I used the code below

<MapValues outputColumn="longForm">
  <FieldColumnPair field="gender" column="shortForm"/>
  <InlineTable>
    <row><shortForm>m</shortForm><longForm>male</longForm>
    </row>
    <row><shortForm>f</shortForm><longForm>female</longForm>
    </row>
  </InlineTable>
</MapValues>

In that code if shortform is m it returns "male", and if shortform is f it returns "female". Also I want want to add else clause for that code. If shortfrom is not m or f it should returns "unknown". How can I do that?

neverwinter
  • 810
  • 2
  • 15
  • 42

1 Answers1

0

You should specify MapValues@defaultValue attribute:

<MapValues outputColumn="longForm" defaultValue="unknown">
  ...
</MapValues>
user1808924
  • 4,563
  • 2
  • 17
  • 20