phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: Phoenix loading via psql.py - specifying tab separator
Date Fri, 12 Dec 2014 00:48:47 GMT
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?

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(PhoenixRuntime.java:527)
>>     at
>> org.apache.phoenix.util.PhoenixRuntime$ExecutionCommand.parseArgs(PhoenixRuntime.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