Skip to content

Instantly share code, notes, and snippets.

@SriniBlog
Created December 23, 2015 09:10
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/819cbcc042ce649abf0e to your computer and use it in GitHub Desktop.
Save SriniBlog/819cbcc042ce649abf0e to your computer and use it in GitHub Desktop.
This is a psedu code to show how to get the instance of the trace, dynamic configuration etc. inside the UDF
public String getInstanceUDF(Container container) throws StreamTransformationException{
GlobalContainer globalContainer;
MappingTrace trace;
String headerField;
java.util.Map map;
trace = container.getTrace();
globalContainer = container.getGlobalContainer();
map = globalContainer.getTransformationParameters();
headerField = (String) map.get( StreamTransformationConstants.INTERFACE_NAMESPACE );
trace.addInfo("INTERFACE_NAMESPACE:" + headerField);
//Add the rest of the code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment