You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues 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 standard 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" = "doris@YOUR.COM",
"broker.kerberos_keytab" = "/home/doris/my.keytab",
"column_separator" = ",",
"line_delimiter" = "\n",
"max_file_size" = "100MB",
"csv.format.standard" = "true"
);
Search before asking
Description
At present, when exporting CSV data, it is simply separated by fields with specified separator, rather than strictly according to the standard 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
Related issues
#7552
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: