[
https://issues.apache.org/jira/browse/LENS-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987223#comment-14987223
]
Deepak Barr commented on LENS-855:
----------------------------------
Ok. I see. But still the problem remains unsolved.
Even if I set
lens.query.result.output.dir.format = ROW FORMAT SERDE
'org.apache.lens.lib.query.CSVSerde' WITH SERDEPROPERTIES
('serialization.null.format'='-NA-','separatorChar'='\t' ) STORED AS TEXTFILE
The headers are always comma-separated only, whereas rows are tab-separated.
If you look at AbstractOutputFormatter.getHeaderFromSerde(), you will see that
headerSerde (an instance of CSVSerde ) formats the result headers.
I am querying a native hive table which looks like this -
CREATE TABLE `test_data`(
`name` string,
`country` string,
`city` string,
`email` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
'hdfs://localhost:9000/user/hive/warehouse/test_data'
> Column headers are always comma-separated in the output file
> ------------------------------------------------------------
>
> Key: LENS-855
> URL: https://issues.apache.org/jira/browse/LENS-855
> Project: Apache Lens
> Issue Type: Bug
> Reporter: Deepak Barr
> Assignee: Deepak Barr
>
> An example scenario -
> If
> lens.query.output.write.header = true
> and
> lens.query.result.output.dir.format = ROW FORMAT DELIMITED FIELDS TERMINATED
> BY '\t'
> then, the final output file (after resultset formatting) contains headers in
> comma-separated format and result rows in tab-separated format.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)