Have a look at "broadcast values/sets". Not sure if that solves you problem, but you could do:
DataSet<String> stringSet = ... DataSet<String> first = stringSet.first(); DataSet myNewSet = stringSet.map(myMapFnc).withBroadcastSet(first,"first value"); This distributes the first DataSet to all Mapper functions and you can read and use the value. Cheers, Fabian 2015-02-05 15:34 GMT+01:00 Vinh June <hoangthevinh....@gmail.com>: > Hi Stefan, > > DataSet.first(n) produces a child DataSet, while I need the element > > Specifically, I have a CSV with header line and I want to make the maps of > each (header,value) pair for each line > > > > -- > View this message in context: > http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/Get-1-element-of-DataSet-tp688p692.html > Sent from the Apache Flink (Incubator) User Mailing List archive. mailing > list archive at Nabble.com. >