Hello Chiwan, I was just about to post to declare my ignorance, because I searched again and realized that I failed to spot ReadCsvFile ! :-) You have been faster than me!
Yes, I should use ReadCsvFile so that I get all the facilities built in. Many thanks for pointing out. -- N [image: --] Nirmalya Sengupta [image: https://]about.me/sengupta.nirmalya <https://about.me/sengupta.nirmalya?promo=email_sig&utm_source=email_sig&utm_medium=external_link&utm_campaign=chrome_ext> On Wed, Apr 27, 2016 at 7:19 AM, Chiwan Park-2 [via Apache Flink User Mailing List archive.] <ml-node+s2336050n6475...@n4.nabble.com> wrote: > Hi, Nirmalya > > I recommend readCsvFile() method rather than readTextFile() to read CSV > file. readCsvFile() provides some features for CSV file such as > ignoreFirstLine() (what you are looking for), ignoreComments(), and etc. > > If you have to use readTextFile() method, I think, you can ignore column > headers by calling zipWithIndex method and filtering it based on the index. > > Regards, > Chiwan Park > > > On Apr 27, 2016, at 10:32 AM, nsengupta <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=6475&i=0>> wrote: > > > > What is the recommended way of discarding the Column Header(s) from a > CSV > > file, if I am using > > > > /environment.readTextFile(....) > > / > > facility? Obviously, we don't know beforehand, which of the nodes will > read > > the Header(s)? So, we cannot use usual tricks like drop(1)? > > > > I don't recall well: has this been discussed and closed earlier in this > > forum? If so, can someone point that out to me please? > > > > -- Nirmalya > > > > > > > > -- > > View this message in context: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Discarding-header-from-CSV-file-tp6474.html > > Sent from the Apache Flink User Mailing List archive. mailing list > archive at Nabble.com. > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Discarding-header-from-CSV-file-tp6474p6475.html > To unsubscribe from Discarding header from CSV file, click here > <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6474&code=c2VuZ3VwdGEubmlybWFseWFAZ21haWwuY29tfDY0NzR8LTU3NDIyNDI0OQ==> > . > NAML > <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- Software Technologist http://www.linkedin.com/in/nirmalyasengupta "If you have built castles in the air, your work need not be lost. That is where they should be. Now put the foundation under them." -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Discarding-header-from-CSV-file-tp6474p6476.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.