Re: Can't transform RDD for the second time

2017-02-28 Thread Mark Hamstra
foreachPartition is not a transformation; it is an action. If you want to transform an RDD using an iterator in each partition, then use mapPartitions. On Tue, Feb 28, 2017 at 8:17 PM, jeremycod wrote: > Hi, > > I'm trying to transform one RDD two times. I'm using

Can't transform RDD for the second time

2017-02-28 Thread jeremycod
Hi, I'm trying to transform one RDD two times. I'm using foreachParition and embedded I have two map transformations on it. First time, it works fine and I get results, but second time I call map on it, it behaves like RDD has no elements. This is my code: val credentialsIdsScala: