phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perko, Ralph J" <Ralph.Pe...@pnnl.gov>
Subject Re: Phoenix loading via psql.py - specifying tab separator
Date Fri, 12 Dec 2014 21:12:19 GMT
I have encountered the same issue with the CsvBulkLoadTool and used the
same workaround


On 12/12/14, 11:53 AM, "Gabriel Reid" <gabriel.reid@gmail.com> wrote:

>On Fri, Dec 12, 2014 at 1:48 AM, James Taylor <jamestaylor@apache.org>
>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 <gabriel.reid@gmail.com>
>>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
>>><shaik.dastu@gmail.com> 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(Phoen
>>>>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 <gabriel.reid@gmail.com>
>>>> 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 <rama.ramani@live.com>
>>>>>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
>>>>
>>>>


Mime
View raw message