Skip to content

Instantly share code, notes, and snippets.

@KazChe
Created August 11, 2016 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KazChe/ab21df85b19ce1c129ca4344ef9b6557 to your computer and use it in GitHub Desktop.
Save KazChe/ab21df85b19ce1c129ca4344ef9b6557 to your computer and use it in GitHub Desktop.
Pentaho PDI - User Defined Java Class - Simple Implementation
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