Skip to main content
lalala
Silver ⭐️⭐️
August 12, 2021
Question

Remove double quotation in impala output

I have a csv data which I have to load in impala/hive. does anyone knows how to remove the double quotation mark in the output? Here is my sample create table scripts.

 

CREATE EXTERNAL TABLE schema.table (   id int,   name STRING,   desc STRING,   desc1 STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/folder/schema/table'

6 replies

ChethanYM
Gold ⭐️
Gold ⭐️
August 13, 2021

Hi,

 

Can you provide the sample output for the same where you are seeing the double quotation mark?

 

Regards,

Chethan YM

Translate
lalala
lalalaAuthor
Silver ⭐️⭐️
August 13, 2021

Hello,

 

This is the sample output:

 

Screenshot 2021-08-13 084332.png

Translate
ebeb
Gold ⭐️⭐️
December 21, 2021

Hello @lalala @ChethanYM did you find any solution to remove double-quote in impala output on a csv external file table.
Input external .gz file has row:
true,false,"US","Los Angeles","California","Cloudflare"

Output of select * from impala external table defined on .gz file above shows:
true false "US" "Los Angeles" "California" "Cloudflare"

 

FYI in AWS Athena doc it says: 

https://docs.aws.amazon.com/athena/latest/ug/lazy-simple-serde.html

LazySimpleSerDe for CSV, TSV, and Custom-Delimited Files

 

Use this SerDe if your data does not have values enclosed in quotes.


How to remove the double-quotes.

Translate