Do we need to download files to desktop for this one ? where is the link to download order_items?



object OrderRevenue {
def main(args: Array[String]) = {
val orderItems = Source.fromFile("/data/retail_db/order_items/part-00000").getLines
val orderRevenue = orderItems.
filter(oi => oi.split(",")(1).toInt == 2).
map(orderItem => oi.split(",")(4).toFloat).
reduce((t, v) => t + v)


Where are you trying this?

In case if you want to setup data set on your PC, please follow this video


ok thankyou I am using both Itversity lab and installed scala on windows