跳到主要内容
版本:3.0.0

BosFile

BOS 文件 Source 连接器

支持引擎​

Spark
Flink
SeaTunnel Zeta

关键特性​

描述​

通过 BOS HDFS SDK 从百度智能云 BOS 读取文件数据。

提示

使用 Spark/Flink 时,需确保集群已集成 Hadoop 2.x。

使用 SeaTunnel Engine 时,Hadoop 相关 jar 已包含在 ${SEATUNNEL_HOME}/lib 中。

使用本连接器需将 bos-hdfs-sdk(>= 1.0.4-community)放入 ${SEATUNNEL_HOME}/lib。下载:bos-hdfs-sdk-1.0.4-community.jar.zip。详见 connector-file-bos/lib/README.md。

配置项​

名称类型必填默认值
pathstring是-
file_format_typestring是-
bucketstring是-
access_keystring是-
secret_keystring是-
endpointstring是-
read_columnslist否-
delimiter/field_delimiterstring否text 为 \001,csv 为 ,
row_delimiterstring否\n
parse_partition_from_pathboolean否true
skip_header_row_numberlong否0
date_formatstring否yyyy-MM-dd
datetime_formatstring否yyyy-MM-dd HH:mm:ss
time_formatstring否HH:mm:ss
schemaconfig否-
sheet_namestring否-
excel_enginestring否POI
poi_excel_max_file_sizelong否52428800
xml_row_tagstring否-
xml_use_attr_formatboolean否-
csv_use_header_lineboolean否false
file_filter_patternstring否-
filename_extensionstring否-
compress_codecstring否none
archive_compress_codecstring否none
encodingstring否UTF-8
binary_chunk_sizeint否1024
binary_complete_file_modeboolean否false
file_filter_modified_startstring否-
file_filter_modified_endstring否-
quote_charstring否"
escape_charstring否-
recursive_file_scanboolean否true
sort_files_by_modification_timeboolean否false

示例​

source {
BosFile {
bucket = "bos://source-bucket"
path = "/warehouse/table/"
file_format_type = "orc"
access_key = "your-access-key"
secret_key = "your-secret-key"
endpoint = "http://bj.bcebos.com"
}
}

二进制文件同步​

source {
BosFile {
bucket = "bos://source-bucket"
path = "/read/binary/"
file_format_type = "binary"
access_key = "your-access-key"
secret_key = "your-secret-key"
endpoint = "http://bj.bcebos.com"
}
}

sink {
BosFile {
bucket = "bos://sink-bucket"
path = "/write/binary/"
file_format_type = "binary"
access_key = "your-access-key"
secret_key = "your-secret-key"
endpoint = "http://bj.bcebos.com"
}
}

变更日志​

变更日志
变更Commit版本
[Feature][Connector-V2] Add BosFile source and sink connector (#11952)https://github.com/apache/seatunnel/commit/99e53aad83.0.0
[Improve][Connector-V2] 新增 Hive BOSStorage,对齐 BosFile e2e/文档至 CosFilehttps://github.com/apache/seatunnel/pull/11952dev
[Feature][Connector-V2] 新增 BosFile Source/Sink 连接器https://github.com/apache/seatunnel/pull/11952dev