I've logged https://issues.apache.org/jira/browse/PHOENIX-1440 to track this.
- Gabriel On Sat, Nov 8, 2014 at 7:37 PM, Radu Marias <[email protected]> wrote: > Sure, I'll do it these days > On Nov 8, 2014 8:34 PM, "James Taylor" <[email protected]> wrote: > >> Thanks for the patch, Radu. It looks good to me. How about filing a >> JIRA and attaching the patch? It'd be good if Gabriel gave it a look >> too. >> >> James >> >> On Fri, Nov 7, 2014 at 2:51 PM, Radu Marias <[email protected]> wrote: >> > I will >> > On Nov 8, 2014 12:47 AM, "Ted Yu" <[email protected]> wrote: >> > >> >> Have you logged a JIRA ? >> >> >> >> Cheers >> >> >> >> On Fri, Nov 7, 2014 at 10:35 AM, Radu Marias <[email protected]> >> wrote: >> >> >> >> > the fix is against 4.2 branch >> >> > >> >> > On Fri, Nov 7, 2014 at 8:34 PM, Radu Marias <[email protected]> >> >> wrote: >> >> > >> >> > > I'm importing a cvs file which has values as double-quoted and with >> >> comma >> >> > > (as the fields separator) also in the value of a field, something >> like >> >> > this: >> >> > > >> >> > > *"1","Charlie's Auto Body, \" Inc.","N","1-1"* >> >> > > >> >> > > The first issue is that first field which is a number cannot be >> parse >> >> > like >> >> > > one because of the quote. >> >> > > If I remove the quotes from csv file than comma from the value >> field is >> >> > > treated as field separator and I get one more extra field, which >> causes >> >> > the >> >> > > import to fail. This is because the cvs parser don't parse it from >> >> > > double-quoted representation, where it should handle the comma as >> part >> >> of >> >> > > the value. >> >> > > The PSQL import handles such cases. >> >> > > >> >> > > I know I can change the comma separator in my files to something >> else >> >> but >> >> > > it not the best approach and also you need to first pre process the >> >> data >> >> > to >> >> > > find an unused character to use. >> >> > > >> >> > > So, I started to look in the code and I come with a fix, attached >> >> patch. >> >> > > Please share your thoughts if you think this would be a useful >> feature >> >> > and >> >> > > I can create a jira issue with the patch. >> >> > > The fix includes support to specify quote and escape chars as >> >> arguments. >> >> > > >> >> > > -- >> >> > > And in the end, it's not the years in your life that count. It's the >> >> life >> >> > > in your years. >> >> > > >> >> > >> >> > >> >> > >> >> > -- >> >> > And in the end, it's not the years in your life that count. It's the >> life >> >> > in your years. >> >> > >> >> >>
