跳到主要内容
版本:Next

OssJindoFile

OssJindo 文件源连接器

支持这些引擎

Spark
Flink
SeaTunnel Zeta

关键特性

  • 多模态

    使用二进制文件格式读写任何格式的文件,例如视频、图片等。简而言之,任何文件都可以同步到目标位置。

  • 精确一次

    在一次 pollNext 调用中读取分割中的所有数据。读取哪些分割将保存在快照中。

  • 列投影

  • 并行性

  • 支持用户自定义split

  • 文件格式类型

    • text
    • csv
    • parquet
    • orc
    • json
    • excel
    • xml
    • binary
    • markdown

描述

使用 Jindo API 从阿里云 OSS 文件系统读取数据。

提示

您需要下载 jindosdk-4.6.1.tar.gz 然后解压缩,从 lib 中复制 jindo-sdk-4.6.1.jar 和 jindo-core-4.6.1.jar 到 ${SEATUNNEL_HOME}/lib。

如果您使用 spark/flink,为了使用此连接器,您必须确保您的 spark/flink 集群已集成 hadoop。测试的 hadoop 版本是 2.x。

如果您使用 SeaTunnel 引擎,它会在您下载和安装 SeaTunnel 引擎时自动集成 hadoop jar。您可以检查 ${SEATUNNEL_HOME}/lib 下的 jar 包来确认这一点。

我们为了支持更多文件类型做了一些权衡,所以我们使用 HDFS 协议来内部访问 OSS,此连接器需要一些 hadoop 依赖项。 它仅支持 hadoop 版本 2.9.X+

选项

参数名类型必须默认值描述
pathstring-目标目录路径
file_format_typestring-文件类型
bucketstring-OSS 文件系统的桶地址
access_keystring-OSS 文件系统的访问密钥
access_secretstring-OSS 文件系统的访问密钥
endpointstring-OSS 文件系统的端点
read_columnslist-数据源的读取列列表
delimiter/field_delimiterstring\001 for text and , for csv字段分隔符
row_delimiterstring\n行分隔符
parse_partition_from_pathbooleantrue控制是否从文件路径解析分区键和值
date_formatstringyyyy-MM-dd日期类型格式
datetime_formatstringyyyy-MM-dd HH:mm:ss日期时间类型格式
time_formatstringHH:mm:ss时间类型格式
skip_header_row_numberlong0跳过前几行
schemaconfig-数据模式
sheet_namestring-Excel 工作表名称
xml_row_tagstring-XML 行标签
xml_use_attr_formatboolean-是否使用 XML 属性格式
csv_use_header_linebooleanfalse是否使用 CSV 标题行
file_filter_patternstring-文件过滤模式

变更日志

Change Log
ChangeCommitVersion
[Feature][File] Add markdown parser #9714https://github.com/apache/seatunnel/commit/8b3c07844dev
[Improve][Connector-V2][OSS-Jindo] Optimize jindo oss connector (#4964)https://github.com/apache/seatunnel/commit/5fbfd050612.3.3
[Fix][Connector-V2] Fix file-oss config check bug and amend file-oss-jindo factoryIdentifier (#4581)https://github.com/apache/seatunnel/commit/5c4f17df202.3.2
[Feature][ConnectorV2]add file excel sink and source (#4164)https://github.com/apache/seatunnel/commit/e3b97ae5d22.3.2
Change file type to file_format_type in file source/sink (#4249)https://github.com/apache/seatunnel/commit/973a2fae3c2.3.1
Merge branch 'dev' into merge/cdchttps://github.com/apache/seatunnel/commit/4324ee19122.3.1
[Improve][Project] Code format with spotless plugin.https://github.com/apache/seatunnel/commit/423b5830382.3.1
[improve][api] Refactoring schema parse (#4157)https://github.com/apache/seatunnel/commit/b2f573a13e2.3.1
[Improve][build] Give the maven module a human readable name (#4114)https://github.com/apache/seatunnel/commit/d7cd6010512.3.1
[Improve][Project] Code format with spotless plugin. (#4101)https://github.com/apache/seatunnel/commit/a2ab1665612.3.1
[Feature][Connector-V2][File] Support compress (#3899)https://github.com/apache/seatunnel/commit/55602f6b1c2.3.1
[Feature][Connector] add get source method to all source connector (#3846)https://github.com/apache/seatunnel/commit/417178fb842.3.1
[Improve][Connector-V2][File] Improve file connector option rule and document (#3812)https://github.com/apache/seatunnel/commit/bd760776692.3.1
[Hotfix][OssFile Connector]fix ossfile bug (#3684)https://github.com/apache/seatunnel/commit/ba6259274d2.3.0
[Feature][Connector-V2][Oss jindo] Add oss jindo source & sink connector (#3456)https://github.com/apache/seatunnel/commit/25073723112.3.0