You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Shailesh Samudrala <sh...@gmail.com> on 2013/08/24 02:45:25 UTC
How to specify delimiter in Hive select query
I'm querying a Hive table on my cluster, (*select * from <table_name>;*)
and writing this select output to output file using (*INSERT OVERWRITE
DIRECTORY*). When the I open the output file, I see that the columns are
delimited by Hive's default delimiter (*^A or ctrl-A*).
So my question is, is there a way I can select data from the table and use
a tab or space delimiter?
Thanks a lot for your help!
Shailesh
Re: How to specify delimiter in Hive select query
Posted by Jagat Singh <ja...@gmail.com>.
This is not possible till hive 0.10 in hive 0.11 there is patch to do.this.
You can insert to some temp.table with required delimiter or use some pig
action to.replace afterwards.
Or best use hive 0.11
On 24/08/2013 10:45 AM, "Shailesh Samudrala" <sh...@gmail.com> wrote:
> I'm querying a Hive table on my cluster, (*select * from <table_name>;*)
> and writing this select output to output file using (*INSERT OVERWRITE
> DIRECTORY*). When the I open the output file, I see that the columns are
> delimited by Hive's default delimiter (*^A or ctrl-A*).
>
> So my question is, is there a way I can select data from the table and use
> a tab or space delimiter?
>
> Thanks a lot for your help!
>
> Shailesh
>
Re: How to specify delimiter in Hive select query
Posted by Jagat Singh <ja...@gmail.com>.
This is not possible till hive 0.10 in hive 0.11 there is patch to do.this.
You can insert to some temp.table with required delimiter or use some pig
action to.replace afterwards.
Or best use hive 0.11
On 24/08/2013 10:45 AM, "Shailesh Samudrala" <sh...@gmail.com> wrote:
> I'm querying a Hive table on my cluster, (*select * from <table_name>;*)
> and writing this select output to output file using (*INSERT OVERWRITE
> DIRECTORY*). When the I open the output file, I see that the columns are
> delimited by Hive's default delimiter (*^A or ctrl-A*).
>
> So my question is, is there a way I can select data from the table and use
> a tab or space delimiter?
>
> Thanks a lot for your help!
>
> Shailesh
>
Re: How to specify delimiter in Hive select query
Posted by Jagat Singh <ja...@gmail.com>.
This is not possible till hive 0.10 in hive 0.11 there is patch to do.this.
You can insert to some temp.table with required delimiter or use some pig
action to.replace afterwards.
Or best use hive 0.11
On 24/08/2013 10:45 AM, "Shailesh Samudrala" <sh...@gmail.com> wrote:
> I'm querying a Hive table on my cluster, (*select * from <table_name>;*)
> and writing this select output to output file using (*INSERT OVERWRITE
> DIRECTORY*). When the I open the output file, I see that the columns are
> delimited by Hive's default delimiter (*^A or ctrl-A*).
>
> So my question is, is there a way I can select data from the table and use
> a tab or space delimiter?
>
> Thanks a lot for your help!
>
> Shailesh
>
Re: How to specify delimiter in Hive select query
Posted by Jagat Singh <ja...@gmail.com>.
This is not possible till hive 0.10 in hive 0.11 there is patch to do.this.
You can insert to some temp.table with required delimiter or use some pig
action to.replace afterwards.
Or best use hive 0.11
On 24/08/2013 10:45 AM, "Shailesh Samudrala" <sh...@gmail.com> wrote:
> I'm querying a Hive table on my cluster, (*select * from <table_name>;*)
> and writing this select output to output file using (*INSERT OVERWRITE
> DIRECTORY*). When the I open the output file, I see that the columns are
> delimited by Hive's default delimiter (*^A or ctrl-A*).
>
> So my question is, is there a way I can select data from the table and use
> a tab or space delimiter?
>
> Thanks a lot for your help!
>
> Shailesh
>