FAQ
All,

Some simple features in Hive can really bring down the learning curve
for new users. I am teaching some how to use hive.

A buddy if mine did this.
hive> select * from mt_date_test;
OK
a 2010-01-01 NULL
b 2009-12-31 NULL
c 2010-01-27 NULL

hive> select * from mt_date_test where my_date > '2010-01-01';

2010-01-27 08:18:27,008 map = 100%, reduce =100%
Ended Job = job_200909171715_20264
OK

I instantly suspected 1) whiteplace 2) delimeters

hive> select key from mt_date_test;

OK
a 2010-01-01
b 2009-12-31
c 2010-01-27

!!BINGO!!

Should we use a pipe | or some other column delimiter like the mysql
CLI does? and have this be a property that is on by default

hive.cli.columnseparator='\t'
hive.cli.columnseparator='|'

In its current state the user understandably made the assumption that
'>' does not work on strings.

Should we add some expose the format of the results in Driver so that
the CLI can effectively split the rows by column?

Search Discussions

  • Ashish Thusoo at Jan 27, 2010 at 9:55 pm
    Looks like a good suggestion. Ideally the driver code should just return a structure that encodes the columns separately as opposed to a single serialized string today and the formatting logic should all be in the CliDriver

    Ashish

    -----Original Message-----
    From: Edward Capriolo
    Sent: Wednesday, January 27, 2010 1:00 PM
    To: hive-user@hadoop.apache.org
    Subject: HIVE-49 and other forms of CLI niceness

    All,

    Some simple features in Hive can really bring down the learning curve for new users. I am teaching some how to use hive.

    A buddy if mine did this.
    hive> select * from mt_date_test;
    OK
    a 2010-01-01 NULL
    b 2009-12-31 NULL
    c 2010-01-27 NULL

    hive> select * from mt_date_test where my_date > '2010-01-01';

    2010-01-27 08:18:27,008 map = 100%, reduce =100% Ended Job = job_200909171715_20264 OK

    I instantly suspected 1) whiteplace 2) delimeters

    hive> select key from mt_date_test;

    OK
    a 2010-01-01
    b 2009-12-31
    c 2010-01-27

    !!BINGO!!

    Should we use a pipe | or some other column delimiter like the mysql CLI does? and have this be a property that is on by default

    hive.cli.columnseparator='\t'
    hive.cli.columnseparator='|'

    In its current state the user understandably made the assumption that '>' does not work on strings.

    Should we add some expose the format of the results in Driver so that the CLI can effectively split the rows by column?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedJan 27, '10 at 9:00p
activeJan 27, '10 at 9:55p
posts2
users2
websitehive.apache.org

2 users in discussion

Ashish Thusoo: 1 post Edward Capriolo: 1 post

People

Translate

site design / logo © 2021 Grokbase