Skip to content

Instantly share code, notes, and snippets.

@SriniBlog
Created December 23, 2015 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SriniBlog/9760c56680bdf820d685 to your computer and use it in GitHub Desktop.
Save SriniBlog/9760c56680bdf820d685 to your computer and use it in GitHub Desktop.
This Advanced UDF use to split the field value based on the splitter character
public void splitValue(String FieldValue, String SplitterChar, ResultList result, Container container) throws StreamTransformationException{
try{
//Split the string value based on the splitterchar
String [ ] strArray = FieldValue.split(SplitterChar);
int istrArray = strArray.length;
for (int i=0; i < istrArray; i++){
result.addValue(strArray[i]);
}
}catch(Exception ee){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment