Filter columns from a PipelinedRDD

岁酱吖の 提交于 2019-12-12 00:46:30

问题


I have a pipelinedRDD that contains lot of key:value pairs, I need to filter out only few of them and ignore the rest. How can I achieve this?

Sample RDD Data

{ 
"PLAN_ID": "7de7cc2d-95be-4b7f-bb2a-77482dc03853"
,"Week": "2017 Wk 11"
,"Demand": 0.0
,"Sales": 0.0
,"LostSales": 0.0
,"InventoryBOP": 0.0
,"InventoryEOP": 2666.0
,"Receipt": 2666.0
,"RecommendedReceipt": 2666.0
,"WeeksOnHand": 0.0
,"WeeksOfSales": 0.0}

I want to filter only PLAN_ID, Receipt, RecommendedReceipt,InventoryEOP, InventoryBOP.

kindly let me know how this can be done,as I am unable to figure this out. Sorry for asking a lot :(

来源:https://stackoverflow.com/questions/40969161/filter-columns-from-a-pipelinedrdd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!