June 2017
Beginner to intermediate
296 pages
7h 4m
English
Now, here are a few useful snippets of code just to make it even easier for you. Again, I want you to be successful here, I recognize that this could be your first Python script ever, so I want to make this as simple as possible. Something you'll find useful in your mapper function is using line.split (' , '), which will split up a comma-delimited line of text into a new RDD called fields, containing each individual field between the commas:
fields = line.split(',')
Of course, you can call line and fields whatever you want, those are just arbitrary names we're using for the RDDs in question.
One thing I want you to make sure of, since we're going to be doing some math on these results and adding up dollar amounts, ...
Read now
Unlock full access