跳到主要内容
版本:Next

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_delimiterstringtext 为 \001,csv 为 ,
row_delimiterstring\n
parse_partition_from_pathbooleantrue
skip_header_row_numberlong0
date_formatstringyyyy-MM-dd
datetime_formatstringyyyy-MM-dd HH:mm:ss
time_formatstringHH:mm:ss
schemaconfig-
sheet_namestring-
excel_enginestringPOI
poi_excel_max_file_sizelong52428800
xml_row_tagstring-
xml_use_attr_formatboolean-
csv_use_header_linebooleanfalse
file_filter_patternstring-
filename_extensionstring-
compress_codecstringnone
archive_compress_codecstringnone
encodingstringUTF-8
binary_chunk_sizeint1024
binary_complete_file_modebooleanfalse
file_filter_modified_startstring-
file_filter_modified_endstring-
quote_charstring"
escape_charstring-
recursive_file_scanbooleantrue
sort_files_by_modification_timebooleanfalse

示例

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版本
[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