Grokbase Groups Hive user May 2011
FAQ
Does anyone know how to export data out with column names? Any help here is appreciated.

Thanks,
Ranjith

Search Discussions

  • Matthew Rathbone at May 3, 2011 at 2:46 pm
    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Raghunath, Ranjith at May 3, 2011 at 6:03 pm
    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Steven Wong at May 3, 2011 at 6:10 pm
    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Loren Siebert at May 3, 2011 at 6:22 pm
    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Raghunath, Ranjith at May 3, 2011 at 7:23 pm
    Thanks Loren. Pardon my ignorance but what is an NPE?

    Thank you,
    Ranjith N. Raghunath

    -----Original Message-----
    From: Loren Siebert
    Sent: Tuesday, May 03, 2011 1:23 PM
    To: user@hive.apache.org
    Cc: user@hive.apache.org
    Subject: Re: Export data with column names

    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Loren Siebert at May 3, 2011 at 7:37 pm
    Sorry, null pointer exception
    On May 3, 2011, at 12:23, "Raghunath, Ranjith" wrote:

    Thanks Loren. Pardon my ignorance but what is an NPE?

    Thank you,
    Ranjith N. Raghunath

    -----Original Message-----
    From: Loren Siebert
    Sent: Tuesday, May 03, 2011 1:23 PM
    To: user@hive.apache.org
    Cc: user@hive.apache.org
    Subject: Re: Export data with column names

    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Sharma, Akash at May 3, 2011 at 7:52 pm
    New to Pig UDF so requesting help to resolve the issue

    Created a Pig UDF to transform an input tuple and generate an
    transformed tuple.
    Executed a Store to save the transformed tuple into a file

    B = FOREACH A GENERATE PackageName.MyMethod();
    STORE B into 'output' USING PigStorage();

    My question is that when sqoop export reads this data from output HDFS
    file and inserts into MYSQL table, the curly braces "(" and ")" are also
    saved into the first and the last column of mysql table. Is there a way
    to avoid curly braces for getting into MySQL column as part of first and
    last column?

    I tried to delimit to tabs explicitly in PigStorage() but that did not
    resolve the issue.


    Any help is appreciated.

    Thanks
    -Akash
  • Sharma, Akash at May 4, 2011 at 7:01 pm
    Finally figured it out.

    Flatten did the trick. Had to call flatten on the tuple returned by the
    UDF as shown below.

    B = FOREACH A GENERATE FLATTEN(PackageName.MyMethod());

    Hope someone out there can make use of this behavior.

    Thanks
    -Akash

    -----Original Message-----
    From: Sharma, Akash
    Sent: Tuesday, May 03, 2011 2:52 PM
    To: user@hive.apache.org
    Subject: Question about Pig UDF and sqoop export

    New to Pig UDF so requesting help to resolve the issue

    Created a Pig UDF to transform an input tuple and generate an
    transformed tuple.
    Executed a Store to save the transformed tuple into a file

    B = FOREACH A GENERATE PackageName.MyMethod();
    STORE B into 'output' USING PigStorage();

    My question is that when sqoop export reads this data from output HDFS
    file and inserts into MYSQL table, the curly braces "(" and ")" are also
    saved into the first and the last column of mysql table. Is there a way
    to avoid curly braces for getting into MySQL column as part of first and
    last column?

    I tried to delimit to tabs explicitly in PigStorage() but that did not
    resolve the issue.


    Any help is appreciated.

    Thanks
    -Akash
  • Steven Wong at May 3, 2011 at 8:20 pm
    Loren, can you point me to the jira that describes the problem/symptom in more detail? If there is no jira yet, can you describe it?

    Thanks.


    -----Original Message-----
    From: Loren Siebert
    Sent: Tuesday, May 03, 2011 11:23 AM
    To: user@hive.apache.org
    Cc: user@hive.apache.org
    Subject: Re: Export data with column names

    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Raghunath, Ranjith at May 3, 2011 at 10:29 pm
    Thanks for the help on this. The option to set the header worked out great. Is there a way that I can export data out to the local file system with the header information?

    Thank you,
    Ranjith N. Raghunath
    -----Original Message-----
    From: Steven Wong
    Sent: Tuesday, May 03, 2011 3:20 PM
    To: user@hive.apache.org
    Subject: RE: Export data with column names

    Loren, can you point me to the jira that describes the problem/symptom in more detail? If there is no jira yet, can you describe it?

    Thanks.


    -----Original Message-----
    From: Loren Siebert
    Sent: Tuesday, May 03, 2011 11:23 AM
    To: user@hive.apache.org
    Cc: user@hive.apache.org
    Subject: Re: Export data with column names

    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith
  • Steven Wong at May 4, 2011 at 1:21 am
    I'm not aware.


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 3:29 PM
    To: user@hive.apache.org
    Subject: RE: Export data with column names

    Thanks for the help on this. The option to set the header worked out great. Is there a way that I can export data out to the local file system with the header information?

    Thank you,
    Ranjith N. Raghunath
    -----Original Message-----
    From: Steven Wong
    Sent: Tuesday, May 03, 2011 3:20 PM
    To: user@hive.apache.org
    Subject: RE: Export data with column names

    Loren, can you point me to the jira that describes the problem/symptom in more detail? If there is no jira yet, can you describe it?

    Thanks.


    -----Original Message-----
    From: Loren Siebert
    Sent: Tuesday, May 03, 2011 11:23 AM
    To: user@hive.apache.org
    Cc: user@hive.apache.org
    Subject: Re: Export data with column names

    Look out for NPEs if you happen to set this option to true before doing add/drop table statements.

    On May 3, 2011, at 11:10, Steven Wong wrote:

    set hive.cli.print.header=true;


    -----Original Message-----
    From: Raghunath, Ranjith
    Sent: Tuesday, May 03, 2011 11:03 AM
    To: 'user@hive.apache.org'
    Subject: Re: Export data with column names

    Thanks. Is there something I can do with cli?

    Thanks,
    Ranjith

    ----- Original Message -----
    From: Matthew Rathbone <matthew@foursquare.com>
    To: user@hive.apache.org <user@hive.apache.org>
    Sent: Tue May 03 09:45:58 2011
    Subject: Re: Export data with column names

    If you use the thrift client you can call connection.getSchema()

    --
    Matthew Rathbone
    Foursquare | Software Engineer | Server Engineering Team
    matthew@foursquare.com | @rathboma | 4sq

    On Monday, May 2, 2011 at 11:12 PM, Raghunath, Ranjith wrote:
    Does anyone know how to export data out with column names? Any help here is appreciated.
    Thanks,
    Ranjith

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedMay 3, '11 at 3:12a
activeMay 4, '11 at 7:01p
posts12
users5
websitehive.apache.org

People

Translate

site design / logo © 2021 Grokbase