Filter columns from a PipelinedRDD

2019-09-11 07:51发布

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 :(

0条回答
登录 后发表回答