Created
August 11, 2016 21:34
-
-
Save KazChe/ab21df85b19ce1c129ca4344ef9b6557 to your computer and use it in GitHub Desktop.
Pentaho PDI - User Defined Java Class - Simple Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private FieldHelper fieldOne = null; | |
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException { | |
Object[] r = getRow(); | |
if (r == null) { | |
setOutputDone(); | |
return false; | |
} | |
fieldOne = get(Fields.In, "ObjectID"); | |
logBasic("UDJC Log: "+ fieldOne.getString(r)); | |
return true; | |
} | |
/* | |
Using this XML content | |
<Level1> | |
<Level2> | |
<Props> | |
<ObjectID>AAAAA</ObjectID> | |
<SAPIDENT>31-8200</SAPIDENT> | |
<Quantity>1</Quantity> | |
<Merkmalname>TX_B</Merkmalname> | |
<Merkmalswert> 600</Merkmalswert> | |
</Props> | |
<Props> | |
<ObjectID>BBBBB</ObjectID> | |
<SAPIDENT>00-8200</SAPIDENT> | |
<Quantity>300</Quantity> | |
<Merkmalname>CA_B</Merkmalname> | |
<Merkmalswert>99900</Merkmalswert> | |
</Props> | |
</Level2> | |
</Level1> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment