Dear Sir / Madam,
I am having problems following the example on using the map-reduce python program as an application using the command line terminal in the IT labs environment.
I want to save the program in the terminal but there is not a save button on the terminal.
I have given the program below, I am trying to save it to directory; retail_app
And subdirectory src/main/python; orderItemsFile = open("/data/retail_db/order_items/part-00000")
orderItemsRead = orderItemsFile.read()
orderItems = orderItemsRead.splitlines()
orderItemsFilter = filter(lambda rec: int(rec.split(",")) == 68880, orderItems)
orderItemsMap = map(lambda rec: float(rec.split(",")), orderItemsFilter)
orderItemsRevenue = reduce(lambda total, element: total+element, orderItemsMap)