We used for the CSV bulk loader --d $'\t' and it worked -----Original Message----- From: Perko, Ralph J [mailto:[email protected]] Sent: Friday, December 12, 2014 11:12 PM To: [email protected] Subject: Re: Phoenix loading via psql.py - specifying tab separator
I have encountered the same issue with the CsvBulkLoadTool and used the same workaround On 12/12/14, 11:53 AM, "Gabriel Reid" <[email protected]> wrote: >On Fri, Dec 12, 2014 at 1:48 AM, James Taylor <[email protected]> >wrote: >> Thanks for that somewhat tricky workaround, Gabriel. Might be worth >> filing a JIRA to see if we could support specifying \t for tab if >> it's easy/feasible? > >Sounds good, I've filed PHOENIX-1523 to improve setting a tab character >as separator. > > >> >> On Thu, Dec 11, 2014 at 2:04 AM, Gabriel Reid >><[email protected]> >>wrote: >>> I just discovered how to get this working properly (I had wrongly >>> assumed that simply supplying '\t' was sufficient). >>> >>> In order to supply a tab character as the delimiter, you need to >>> supply a tab literal for the -d parameter. This is done (at least on >>> Linux and Mac OS X) by typing Ctrl-v and then hitting the tab >>> character when you're between the single quotes. So in other words, >>> while typing out the command line, the sequence of keystrokes you >>> need to type after the -d flag is: >>> 1. single quote key >>> 2. Ctrl and v keys together >>> 3. Tab key >>> 4. single quote key >>> >>> This is a general terminal thing, and not specific to Phoenix or >>>Java or Python. >>> >>> I don't know if this will work on Windows (and I expect that it >>> won't), and unfortunately I can't say what the correct way is to get >>> something like this working in Windows. >>> >>> - Gabriel >>> >>> >>> On Thu, Dec 11, 2014 at 9:17 AM, Dastagiri Shaik >>><[email protected]> wrote: >>>> hi , >>>> i am also facing similar type problem >>>> >>>> 1) this is the command >>>> psql.py -t tablename -d '\t' hostname >>>>/home/hadoop/staging/ord_smry.csv >>>> >>>> 2) OS is cent os >>>> >>>> 3)Error : >>>> >>>> >>>> Exception in thread "main" java.lang.IllegalArgumentException: >>>> Invalid single character: '\t' >>>> at >>>> >>>>org.apache.phoenix.util.PhoenixRuntime$ExecutionCommand.getCharacter >>>>(Ph >>>>oenixRuntime.java:527) >>>> at >>>> >>>>org.apache.phoenix.util.PhoenixRuntime$ExecutionCommand.parseArgs(Ph >>>>oen >>>>ixRuntime.java:485) >>>> at >>>>org.apache.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:153) >>>> >>>> Version of Phoenix is 4.1 >>>> >>>> Regards >>>> Dastagiri >>>> >>>> On Thu, Dec 11, 2014 at 1:03 AM, Gabriel Reid >>>> <[email protected]> >>>> wrote: >>>>> >>>>> Hi Rama, >>>>> >>>>> Could you give a bit more information, including: >>>>> * what is the exact full command that you're entering >>>>> * which version of Phoenix are you using >>>>> * what is your environment (i.e. which OS are you running on) >>>>> * what is the exact error (and/or stacktrace) that you're getting >>>>> >>>>> Thanks, >>>>> >>>>> Gabriel >>>>> >>>>> >>>>> On Mon, Dec 8, 2014 at 7:50 PM, Rama Ramani <[email protected]> >>>>>wrote: >>>>> > Hello, I have an TSV (tab separated file) and trying to use the >>>>> > -d option with psql.py. >>>>> > >>>>> > I tried specifying '\t' but get an error. How should I specify >>>>> > the >>>>>tab >>>>> > separator when using psql.py? >>>>> > >>>>> > thanks >>>>> > Rama >>>> >>>> Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.
