Last active
July 7, 2017 23:24
-
-
Save MrTonyDuarte/3bd73e9544803b50b753fa122e5d0369 to your computer and use it in GitHub Desktop.
PythonForBigDataProgramming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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