- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to get header in Impala output csv file
- Labels:
-
Apache Impala
Created on ‎03-26-2017 12:46 PM - edited ‎09-16-2022 04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
Created ‎03-26-2017 03:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎03-26-2017 03:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the answer ...
add " --print_header " option to command string
Created ‎03-27-2017 04:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cool, I'm glad you found an answer. Thanks for sharing it here, too.
Cheers, Lars
