Reply
Explorer
Posts: 40
Registered: ‎02-01-2017

Export query to csv with no delimeter and no extra quotes

I want to export an impala query where it concats many columns into one without a delimeter and the extra quotes that come with it .

 

Here is my query 

impala-shell --ssl -B -i ${load_balancer} -f  ${sql_file_local_subscriber} -o ${file_path_edge_subscriber}  --print_header;

Basically it gives " ""A"",""B"",""C"" "

 

I want "A" , "B" , "C".

 

How can I accomplish this through impala.

 

Thank you

Highlighted
Expert Contributor
Posts: 125
Registered: ‎07-17-2017

Re: Export query to csv with no delimeter and no extra quotes

Hi @gimp077,

You need to use this option of impala-shell

--output_delimiter=character

I think in you case you have to do:

impala-shell ... '--output_delimiter=,'


source: https://www.cloudera.com/documentation/enterprise/latest/topics/impala_shell_options.html

 


Good luck.

Announcements