You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by CHEBARO Abdallah <Ab...@murex.com> on 2014/09/04 14:43:31 UTC

Hive columns

Hello,

Is it possible to create an external table without specifying the columns?

In fact, I am creating an external table that points to a directory that contains 3 text file, and each text file has different number of columns.

Thanks
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

RE: Hive columns

Posted by CHEBARO Abdallah <Ab...@murex.com>.
thanks

From: Nitin Pawar [mailto:nitinpawar432@gmail.com]
Sent: Thursday, September 04, 2014 4:23 PM
To: user@hive.apache.org
Subject: Re: Hive columns

it means you will need to define atleast one column in hive or build your fileformat which can handle reading the files and giving data back to hive

when i say atleast one column, by default hive uses "\n" as record terminator that means you can define an entire row as a column and then process it the way you want
this is just a suggestion and it would be really tedious to keep the mapping.

Instead I would suggest use pig to create proper tables from these files and then use hive to do more deeper analytics

On Thu, Sep 4, 2014 at 6:35 PM, CHEBARO Abdallah <Ab...@murex.com>> wrote:
Can you please specify what this means?

From: Nitin Pawar [mailto:nitinpawar432@gmail.com<ma...@gmail.com>]
Sent: Thursday, September 04, 2014 4:00 PM
To: user@hive.apache.org<ma...@hive.apache.org>
Subject: Re: Hive columns

If those are text files you can create the table with single column and then process them line by line

On Thu, Sep 4, 2014 at 6:13 PM, CHEBARO Abdallah <Ab...@murex.com>> wrote:
Hello,

Is it possible to create an external table without specifying the columns?

In fact, I am creating an external table that points to a directory that contains 3 text file, and each text file has different number of columns.

Thanks

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.



--
Nitin Pawar

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.



--
Nitin Pawar
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

Re: Hive columns

Posted by Nitin Pawar <ni...@gmail.com>.
it means you will need to define atleast one column in hive or build your
fileformat which can handle reading the files and giving data back to hive

when i say atleast one column, by default hive uses "\n" as record
terminator that means you can define an entire row as a column and then
process it the way you want
this is just a suggestion and it would be really tedious to keep the
mapping.

Instead I would suggest use pig to create proper tables from these files
and then use hive to do more deeper analytics


On Thu, Sep 4, 2014 at 6:35 PM, CHEBARO Abdallah <Abdallah.CHEBARO@murex.com
> wrote:

>  Can you please specify what this means?
>
>
>
> *From:* Nitin Pawar [mailto:nitinpawar432@gmail.com]
> *Sent:* Thursday, September 04, 2014 4:00 PM
> *To:* user@hive.apache.org
> *Subject:* Re: Hive columns
>
>
>
> If those are text files you can create the table with single column and
> then process them line by line
>
>
>
> On Thu, Sep 4, 2014 at 6:13 PM, CHEBARO Abdallah <
> Abdallah.CHEBARO@murex.com> wrote:
>
> Hello,
>
>
>
> Is it possible to create an external table without specifying the columns?
>
>
>
> In fact, I am creating an external table that points to a directory that
> contains 3 text file, and each text file has different number of columns.
>
>
>
> Thanks
>
> *******************************
>
> This e-mail contains information for the intended recipient only. It may
> contain proprietary material or confidential information. If you are not
> the intended recipient you are not authorised to distribute, copy or use
> this e-mail or any attachment to it. Murex cannot guarantee that it is
> virus free and accepts no responsibility for any loss or damage arising
> from its use. If you have received this e-mail in error please notify
> immediately the sender and delete the original email received, any
> attachments and all copies from your system.
>
>
>
>
>
> --
> Nitin Pawar
>
> *******************************
>
> This e-mail contains information for the intended recipient only. It may
> contain proprietary material or confidential information. If you are not
> the intended recipient you are not authorised to distribute, copy or use
> this e-mail or any attachment to it. Murex cannot guarantee that it is
> virus free and accepts no responsibility for any loss or damage arising
> from its use. If you have received this e-mail in error please notify
> immediately the sender and delete the original email received, any
> attachments and all copies from your system.
>



-- 
Nitin Pawar

RE: Hive columns

Posted by CHEBARO Abdallah <Ab...@murex.com>.
Can you please specify what this means?

From: Nitin Pawar [mailto:nitinpawar432@gmail.com]
Sent: Thursday, September 04, 2014 4:00 PM
To: user@hive.apache.org
Subject: Re: Hive columns

If those are text files you can create the table with single column and then process them line by line

On Thu, Sep 4, 2014 at 6:13 PM, CHEBARO Abdallah <Ab...@murex.com>> wrote:
Hello,

Is it possible to create an external table without specifying the columns?

In fact, I am creating an external table that points to a directory that contains 3 text file, and each text file has different number of columns.

Thanks

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.



--
Nitin Pawar
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

Re: Hive columns

Posted by Nitin Pawar <ni...@gmail.com>.
If those are text files you can create the table with single column and
then process them line by line


On Thu, Sep 4, 2014 at 6:13 PM, CHEBARO Abdallah <Abdallah.CHEBARO@murex.com
> wrote:

>  Hello,
>
>
>
> Is it possible to create an external table without specifying the columns?
>
>
>
> In fact, I am creating an external table that points to a directory that
> contains 3 text file, and each text file has different number of columns.
>
>
>
> Thanks
>
> *******************************
>
> This e-mail contains information for the intended recipient only. It may
> contain proprietary material or confidential information. If you are not
> the intended recipient you are not authorised to distribute, copy or use
> this e-mail or any attachment to it. Murex cannot guarantee that it is
> virus free and accepts no responsibility for any loss or damage arising
> from its use. If you have received this e-mail in error please notify
> immediately the sender and delete the original email received, any
> attachments and all copies from your system.
>



-- 
Nitin Pawar