hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pushkar.Gujar" <pushkarvgu...@gmail.com>
Subject Re: Missing column headers from S3 file
Date Thu, 09 Mar 2017 01:49:50 GMT
if you were running CTAS command from hive CLI, you might have noticed that
headers get printed in CLI once the query execution is completed. I think
the property hive.cli.print.header is there to only print headers only in
cli.

Not sure about S3, but I tried below which worked perfectly

hive -e "set hive.cli.print.header=true; create table....." >> output.txt


Thank you,
*Pushkar Gujar*


On Wed, Mar 8, 2017 at 6:47 PM, Punit Shetty <punitshetty30@gmail.com>
wrote:

> Hi,
>
> I'm trying to get the column headers into a S3 file.
>
> When I run this on the hive command line:
> set hive.cli.print.header=true;
> select * from abc;
>
> Things work fine, I'm able to see the column headers with the table data
> on the console.
>
> But my query is, when I try something like this:
> set hive.cli.print.header=true;
> CREATE TABLE test123 ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES
> TERMINATED BY '\n' STORED AS TEXTFILE LOCATION 's3://somelocation' AS
> select * abc;
>
> The column headers are missing from the S3 file.
>
> Is this the expected behaviour or am I missing something?
>
> Thanks,
> Punit
>

Mime
View raw message