Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • hi the challenge is that not all lines have the same data. Some lines would not have fields that are presence in other lines. Commented Jan 23, 2017 at 6:16
  • @JanShamsani: Does your challenge allow you to do two passes? Commented Jan 23, 2017 at 6:24
  • Just extend the example. Read through all the lines in your file, extract all the column names, and then process all the lines inserting zeros or nulls where they line doesn't have a certain column. The example I gave is just an example. Commented Jan 23, 2017 at 17:26