Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Blank Lines at the beginning of output csv from Impala-shell

avatar
Contributor

We have a user who is running impala-shell from the edge node of our hadoop cluster. The user is running a query sucessfully and having the output of the query going to a csv. When the user looks at the csv with vim or vi they have two two blank lines before the data from the query shows up. Has anybody else had this problem? The user is able to remove the two blank lines, but is annoyed by this process because it interrupts his workflow.

 

Anybody else have this problem?

 

Impala-shell command

 

impala-shell --ssl -V -i hare1.putnaminv.com:21000 -u cmorris -B -o test.csv --print_header --output_delimiter='|' -f user.sql

 

Example of test.csv

 

----------------------------------------------------

 

 

head header head

data

data

data

1 ACCEPTED SOLUTION

avatar
Contributor
Hi,

So I worked with Cloudera Support, the problem was our user had a comment before the first line of his query.

Example
--comment is here
use database;

View solution in original post

5 REPLIES 5

avatar
Rising Star

What version of Impala?

 

Does this happen with -q "show databases" instead of -f user.sql?

avatar
Contributor
Let me check with my user and see if it makes any difference. I will report back after the user tests

We are running Impala 2.3 from CDH 5.5.4

avatar
Contributor
Using -q as a flag for Impala shell seemed to make things much worse

avatar
Rising Star
In what way did it make things worse? When you tried -q, did you drop the "-f user.sql" part off of your command line? Did you add "show databases" right after -q?

avatar
Contributor
Hi,

So I worked with Cloudera Support, the problem was our user had a comment before the first line of his query.

Example
--comment is here
use database;