[
https://issues.apache.org/jira/browse/TRAFODION-2680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080938#comment-16080938
]
Rohit Jain commented on TRAFODION-2680:
---------------------------------------
I know about this interface and in fact used this exact interface to extract
the csv format output from the Trafodion repository. However, this interface
does not follow the CSV export guidelines as referenced here:
https://en.wikipedia.org/wiki/Comma-separated_values
The problem is that there are quotes, and sometimes commas, in the SQL text
that is in the QUERY_TEXT column that is not escaped when the output is
created. This results in the CSV file not usable for loading into any tool,
e.g. Excel. As the guideline mentions, all text within those fields needs to
be escaped properly so that the CSV file can be considered a legitimate CSV
file that can be loaded. See below:
"The CSV file format is not standardized. The basic idea of separating fields
with a comma is clear, but that idea gets complicated when the field data may
also contain commas or even embedded line-breaks. CSV implementations may not
handle such field data, or they may use quotation marks to surround the field.
Quotation does not solve everything: some fields may need embedded quotation
marks, so a CSV implementation may include escape characters or escape
sequences."
> CSV_FORMAT function
> -------------------
>
> Key: TRAFODION-2680
> URL: https://issues.apache.org/jira/browse/TRAFODION-2680
> Project: Apache Trafodion
> Issue Type: New Feature
> Components: sql-cmp
> Affects Versions: 2.2-incubating
> Environment: All
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
>
> To make it easier to get Trafodion data into spreadsheets, add a CSV_FORMAT
> function to Trafodion SQL.
> Syntax: CSV_FORMAT(argument1, ... ,argumentn)
> Semantics: The result of CSV_FORMAT is a VARCHAR string consisting of a
> comma-separated list of the argument values. If the argument itself contains
> a comma, it is surrounded with double quotes.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)