Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to get header in Impala output csv file

SOLVED Go to solution

How to get header in Impala output csv file

Explorer

 When I use this command, it produces a nice pipe-delimited file - which is what I want.  However, there is no header row.  What syntax must I include to ensure that the output csv file has a header row?

 

impala-shell -i <servername:portname>  -B -q 'SELECT from_unixtime(field00) as 'in_date', field01, field02 FROM <table>  LIMIT 100;' -o query_out.csv '--output_delimiter=\174'

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to get header in Impala output csv file

Explorer

Found the answer ...

 

 add " --print_header " option to command string

2 REPLIES 2
Highlighted

Re: How to get header in Impala output csv file

Explorer

Found the answer ...

 

 add " --print_header " option to command string

Re: How to get header in Impala output csv file

Expert Contributor

Cool, I'm glad you found an answer. Thanks for sharing it here, too.

 

Cheers, Lars