CUITCHE opened a new issue #6954:
URL: https://github.com/apache/incubator-doris/issues/6954


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Description
   
   At present, when exporting CSV data, it is simply separated by fields with 
specified separator, rather than strictly according to the CSV format. 
   For example, if the field contains a comma, Doris will not use the double 
quotation mark wrapper field when exporting, resulting in wrong columns in the 
final result set.
   
   For Table(t1) data storage is ['x1,', 'x2', f2, f3].
   Exporting text is `x1,,x2,f2,f3`. Obviously, not what we expected.
   
   
   ### Use case
   
   In CSV format, we could add a key-value to PROPERTIES to indicate that the 
exporting action will be exported by standard CSV format.
   
   The key-value may be `"csv.format.standard" = "true"`
   
   Example
   ```
   SELECT * FROM tbl
   INTO OUTFILE "hdfs:/path/to/result_"
   FORMAT AS CSV
   PROPERTIES
   (
       "broker.name" = "my_broker",
       "broker.hadoop.security.authentication" = "kerberos",
       "broker.kerberos_principal" = "do...@your.com",
       "broker.kerberos_keytab" = "/home/doris/my.keytab",
       "column_separator" = ",",
       "line_delimiter" = "\n",
       "max_file_size" = "100MB",
       "csv.format.standard" = "true"
   );
   ```
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to