Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to get header in Impala output csv file

avatar
Contributor

 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

avatar
Contributor

Found the answer ...

 

 add " --print_header " option to command string

View solution in original post

2 REPLIES 2

avatar
Contributor

Found the answer ...

 

 add " --print_header " option to command string

avatar
Super Collaborator

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

 

Cheers, Lars