I have a text file that is comma delimited but each row does not have the same number of fields. The first field has a 2 digit code that determines how many fields will be in that row (it's a code NOT a count). I'm curious if there's some kind of standard method for handling this kind of data for getting it into a SQL environment.
File looks like this:
10,abc,20141001,test@test.com,555-555-5555
20,abc,20141001,123 Main St,Springfield,CT,10001
10,xyz,20141001,test2@test.com,111-111-1111
...
Also the file is ~12 GB so I can't open it in a text editor to manipulate it. I originally tried to read it into R and split it into separate files using grep('^10,') or something like that but there appears to be an encoding/delimiter issue I'm missing. I'm assuming others have dealt with a similar piece of data and would appreciate any suggestions.