Skip to content

Instantly share code, notes, and snippets.

@viksingh
Forked from SriniBlog/getGlobalParameter.java
Created February 9, 2018 01:12
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 viksingh/f2f581c8aebfb82fe340bcc8ce680210 to your computer and use it in GitHub Desktop.
Save viksingh/f2f581c8aebfb82fe340bcc8ce680210 to your computer and use it in GitHub Desktop.
This method can be used in UDF to read the parameters from GlobalContainer instance
public String getGlobalParameter(String Parameter, Container container) throws StreamTransformationException{
String ParameterValue = "";
try{
GlobalContainer gc = container.getGlobalContainer();
ParameterValue = (String) gc.getParameter(parameter);
}catch(Exception ee){
ParameterValue = "";
}
return ParameterValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment