Skip to content

Instantly share code, notes, and snippets.

@MrTonyDuarte
Last active July 7, 2017 23:24
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 MrTonyDuarte/3bd73e9544803b50b753fa122e5d0369 to your computer and use it in GitHub Desktop.
Save MrTonyDuarte/3bd73e9544803b50b753fa122e5d0369 to your computer and use it in GitHub Desktop.
PythonForBigDataProgramming
def transform(record, emitter, context): (1)(2)
import sys (3)
# Debug write of record components to cdap.log file (4)
sys.stdout.write("XXXoffset: %i\n" % record['offset']) (5)
sys.stdout.write("XXXbody: %s\n" % record['body'])
# now write the unmodified record object to the next pipeline stage
emitter.emit(record) (6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment