You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "EricJoy2048 (via GitHub)" <gi...@apache.org> on 2023/09/15 03:52:14 UTC

[GitHub] [seatunnel] EricJoy2048 commented on a diff in pull request #5459: [Feature] [File Connector] Supports writing column names when the output type is file (CSV)

EricJoy2048 commented on code in PR #5459:
URL: https://github.com/apache/seatunnel/pull/5459#discussion_r1326759129


##########
docs/en/connector-v2/sink/LocalFile.md:
##########
@@ -166,6 +167,10 @@ When File Format is Excel,The maximum number of data items that can be cached in
 
 Writer the sheet of the workbook
 
+### enable_header_write [boolean]
+
+Only used when file_format_type is text,csv.false:dont write header,true:write header.

Review Comment:
   ```suggestion
   Only used when file_format_type is text,csv.false:don't write header,true:write header.
   ```



##########
docs/en/connector-v2/sink/LocalFile.md:
##########
@@ -30,26 +30,27 @@ By default, we use 2PC commit to ensure `exactly-once`
 
 ## Options
 
-|               name               |  type   | required |               default value                |                          remarks                          |
-|----------------------------------|---------|----------|--------------------------------------------|-----------------------------------------------------------|
-| path                             | string  | yes      | -                                          |                                                           |
-| custom_filename                  | boolean | no       | false                                      | Whether you need custom the filename                      |
-| file_name_expression             | string  | no       | "${transactionId}"                         | Only used when custom_filename is true                    |
-| filename_time_format             | string  | no       | "yyyy.MM.dd"                               | Only used when custom_filename is true                    |
-| file_format_type                 | string  | no       | "csv"                                      |                                                           |
-| field_delimiter                  | string  | no       | '\001'                                     | Only used when file_format_type is text                   |
-| row_delimiter                    | string  | no       | "\n"                                       | Only used when file_format_type is text                   |
-| have_partition                   | boolean | no       | false                                      | Whether you need processing partitions.                   |
-| partition_by                     | array   | no       | -                                          | Only used then have_partition is true                     |
-| partition_dir_expression         | string  | no       | "${k0}=${v0}/${k1}=${v1}/.../${kn}=${vn}/" | Only used then have_partition is true                     |
-| is_partition_field_write_in_file | boolean | no       | false                                      | Only used then have_partition is true                     |
-| sink_columns                     | array   | no       |                                            | When this parameter is empty, all fields are sink columns |
-| is_enable_transaction            | boolean | no       | true                                       |                                                           |
-| batch_size                       | int     | no       | 1000000                                    |                                                           |
-| compress_codec                   | string  | no       | none                                       |                                                           |
-| common-options                   | object  | no       | -                                          |                                                           |
-| max_rows_in_memory               | int     | no       | -                                          | Only used when file_format_type is excel.                 |
-| sheet_name                       | string  | no       | Sheet${Random number}                      | Only used when file_format_type is excel.                 |
+|               name               |  type   | required |               default value                |                                         remarks                                         |
+|----------------------------------|---------|----------|--------------------------------------------|-----------------------------------------------------------------------------------------|
+| path                             | string  | yes      | -                                          |                                                                                         |
+| custom_filename                  | boolean | no       | false                                      | Whether you need custom the filename                                                    |
+| file_name_expression             | string  | no       | "${transactionId}"                         | Only used when custom_filename is true                                                  |
+| filename_time_format             | string  | no       | "yyyy.MM.dd"                               | Only used when custom_filename is true                                                  |
+| file_format_type                 | string  | no       | "csv"                                      |                                                                                         |
+| field_delimiter                  | string  | no       | '\001'                                     | Only used when file_format_type is text                                                 |
+| row_delimiter                    | string  | no       | "\n"                                       | Only used when file_format_type is text                                                 |
+| have_partition                   | boolean | no       | false                                      | Whether you need processing partitions.                                                 |
+| partition_by                     | array   | no       | -                                          | Only used then have_partition is true                                                   |
+| partition_dir_expression         | string  | no       | "${k0}=${v0}/${k1}=${v1}/.../${kn}=${vn}/" | Only used then have_partition is true                                                   |
+| is_partition_field_write_in_file | boolean | no       | false                                      | Only used then have_partition is true                                                   |
+| sink_columns                     | array   | no       |                                            | When this parameter is empty, all fields are sink columns                               |
+| is_enable_transaction            | boolean | no       | true                                       |                                                                                         |
+| batch_size                       | int     | no       | 1000000                                    |                                                                                         |
+| compress_codec                   | string  | no       | none                                       |                                                                                         |
+| common-options                   | object  | no       | -                                          |                                                                                         |
+| max_rows_in_memory               | int     | no       | -                                          | Only used when file_format_type is excel.                                               |
+| sheet_name                       | string  | no       | Sheet${Random number}                      | Only used when file_format_type is excel.                                               |
+| enable_header_write              | boolean | no       | false                                      | Only used when file_format_type is text,csv. false:dont write header,true:write header. |

Review Comment:
   ```suggestion
   | enable_header_write              | boolean | no       | false                                      | Only used when file_format_type is text,csv. false:don't write header,true:write header. |
   ```



-- 
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-unsubscribe@seatunnel.apache.org

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