davidzollo commented on code in PR #8844: URL: https://github.com/apache/seatunnel/pull/8844#discussion_r1971084889
##########
docs/zh/connector-v2/sink/SftpFile.md:
##########
@@ -0,0 +1,329 @@
+# SftpFile
+
+> Sftp file sink 连接器
+
+## 描述
+
+将数据输出到Sftp。
+
+:::提示
+
+如果你使用spark/flink,为了使用这个连接器,你必须确保你的spark/flink集群已经集成了hadoop。测试的hadoop版本是2.x。
+
+如果你使用SeaTunnel Engine,当你下载并安装SeaTunnel引擎时,它会自动集成hadoop
jar。您可以在${SEATUNNEL_HOME}/lib下检查jar包以确认这一点。
+
+:::
+
+## 主要特性
+
+- [x] [精确一次](../../concept/connector-v2-features.md)
+
+默认情况下,我们使用2PC commit来确保`精确一次`
+
+- [x] 文件格式类型
+ - [x] text
+ - [x] csv
+ - [x] parquet
+ - [x] orc
+ - [x] json
+ - [x] excel
+ - [x] xml
+ - [x] binary
+
+## 参数
+
+| 名称 | 类型 | 是否必填 | 默认值
| 备注
|
+|---------------------------------------|---------|----------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| host | string | 是 | -
|
|
+| port | int | 是 | -
|
|
+| user | string | 是 | -
|
|
+| password | string | 是 | -
|
|
+| path | string | 是 | -
|
|
+| tmp_path | string | 是 | /tmp/seatunnel
| 结果文件将首先写入tmp路径,然后使用`mv`将tmp目录剪切到目标目录。需要一个FTP目录。
|
+| custom_filename | boolean | 否 | false
| 是否需要自定义文件名
|
+| file_name_expression | string | 否 |
"${transactionId}" | 仅在custom_filename为true时使用
|
+| filename_time_format | string | 否 | "yyyy.MM.dd"
| 仅在custom_filename为true时使用
|
+| file_format_type | string | 否 | "csv"
|
|
+| field_delimiter | string | 否 | '\001'
| 仅当file_format_type为text时使用
|
+| row_delimiter | string | 否 | "\n"
| 仅当file_format_type为text时使用
|
+| have_partition | boolean | 否 | false
| 是否需要处理分区。
|
+| partition_by | array | 否 | -
| 只有在have_partition为true时才使用
|
+| partition_dir_expression | string | 否 |
"${k0}=${v0}/${k1}=${v1}/.../${kn}=${vn}/" | 只有在have_partition为true时才使用
|
+| is_partition_field_write_in_file | boolean | 否 | false
| 只有在have_partition为true时才使用
|
+| sink_columns | array | 否 |
| 当此参数为空时,所有字段都是sink列
|
+| is_enable_transaction | boolean | 否 | true
|
|
+| batch_size | int | 否 | 1000000
|
|
+| compress_codec | string | 否 | none
|
|
+| common-options | object | 否 | -
|
|
+| max_rows_in_memory | int | 否 | -
| 仅当file_format_type为excel时使用。
|
+| sheet_name | string | 否 | Sheet${Random
number} | 仅当file_format_type为excel时使用。
|
+| csv_string_quote_mode | enum | 否 | MINIMAL
| 仅当file_format_type为csv时使用。
|
+| xml_root_tag | string | 否 | RECORDS
| 仅当file_format_type为xml时使用
|
+| xml_row_tag | string | 否 | RECORD
| 仅当file_format_type为xml时使用
|
+| xml_use_attr_format | boolean | 否 | -
| 仅当file_format_type为xml时使用
|
+| single_file_mode | boolean | 否 | false
| 每个并行处理只会输出一个文件。启用此参数后,batch_size将不会生效。输出文件名没有文件块后缀。
|
+| create_empty_file_when_no_data | boolean | 否 | false
| 当上游没有数据同步时,仍然会生成相应的数据文件。
|
+| parquet_avro_write_timestamp_as_int96 | boolean | 否 | false
| 仅当file_format_type为parquet时使用
|
+| enable_header_write | boolean | 否 | false
|
仅当file_format_type为text、csv时使用<br/>false:不写标头,true:写标头。
|
+| parquet_avro_write_fixed_as_int96 | array | 否 | -
| 仅当file_format_type为parquet时使用
|
+| encoding | string | 否 | "UTF-8"
| 仅当file_format_type为json、text、csv、xml时使用。
|
+| schema_save_mode | string | 否 |
CREATE_SCHEMA_WHEN_NOT_EXIST | 现有目录处理方式
|
+| data_save_mode | string | 否 | APPEND_DATA
| 现有目录处理方式
|
Review Comment:
```suggestion
| data_save_mode | string | 否 | APPEND_DATA
| 现有数据处理方式
|
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
