OssJindoFile
OssJindo 文件源连接器
支持这些引擎
Spark
Flink
SeaTunnel Zeta
关键特性
使用二进制文件格式读写任何格式的文件,例如视频、图片等。简而言之,任何文件都可以同步到目标位置。
在一次 pollNext 调用中读取分割中的所有数据。读取哪些分割将保存在快照中。
文件格式类型
- 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+。
选项
| 参数名 | 类型 | 必须 | 默认值 | 描述 |
|---|---|---|---|---|
| path | string | 是 | - | 目标目录路径 |
| file_format_type | string | 是 | - | 文件类型 |
| bucket | string | 是 | - | OSS 文件系统的桶地址 |
| access_key | string | 是 | - | OSS 文件系统的访问密钥 |
| access_secret | string | 是 | - | OSS 文件系统的访问密钥 |
| endpoint | string | 是 | - | OSS 文件系统的端点 |
| read_columns | list | 否 | - | 数据源的读取列列表 |
| delimiter/field_delimiter | string | 否 | \001 for text and , for csv | 字段分隔符 |
| row_delimiter | string | 否 | \n | 行分隔符 |
| parse_partition_from_path | boolean | 否 | true | 控制是否从文件路径解析分区键和值 |
| date_format | string | 否 | yyyy-MM-dd | 日期类型格式 |
| datetime_format | string | 否 | yyyy-MM-dd HH:mm:ss | 日期时间类型格式 |
| time_format | string | 否 | HH:mm:ss | 时间类型格式 |
| skip_header_row_number | long | 否 | 0 | 跳过前几行 |
| schema | config | 否 | - | 数据模式 |
| sheet_name | string | 否 | - | Excel 工作表名称 |
| xml_row_tag | string | 否 | - | XML 行标签 |
| xml_use_attr_format | boolean | 否 | - | 是否使用 XML 属性格式 |
| csv_use_header_line | boolean | 否 | false | 是否使用 CSV 标题行 |
| file_filter_pattern | string | 否 | - | 文件过滤模式 |
变更日志
Change Log
| Change | Commit | Version |
|---|---|---|
| [Feature][File] Add markdown parser #9714 | https://github.com/apache/seatunnel/commit/8b3c07844 | dev |
| [Improve][Connector-V2][OSS-Jindo] Optimize jindo oss connector (#4964) | https://github.com/apache/seatunnel/commit/5fbfd05061 | 2.3.3 |
| [Fix][Connector-V2] Fix file-oss config check bug and amend file-oss-jindo factoryIdentifier (#4581) | https://github.com/apache/seatunnel/commit/5c4f17df20 | 2.3.2 |
| [Feature][ConnectorV2]add file excel sink and source (#4164) | https://github.com/apache/seatunnel/commit/e3b97ae5d2 | 2.3.2 |
| Change file type to file_format_type in file source/sink (#4249) | https://github.com/apache/seatunnel/commit/973a2fae3c | 2.3.1 |
| Merge branch 'dev' into merge/cdc | https://github.com/apache/seatunnel/commit/4324ee1912 | 2.3.1 |
| [Improve][Project] Code format with spotless plugin. | https://github.com/apache/seatunnel/commit/423b583038 | 2.3.1 |
| [improve][api] Refactoring schema parse (#4157) | https://github.com/apache/seatunnel/commit/b2f573a13e | 2.3.1 |
| [Improve][build] Give the maven module a human readable name (#4114) | https://github.com/apache/seatunnel/commit/d7cd601051 | 2.3.1 |
| [Improve][Project] Code format with spotless plugin. (#4101) | https://github.com/apache/seatunnel/commit/a2ab166561 | 2.3.1 |
| [Feature][Connector-V2][File] Support compress (#3899) | https://github.com/apache/seatunnel/commit/55602f6b1c | 2.3.1 |
| [Feature][Connector] add get source method to all source connector (#3846) | https://github.com/apache/seatunnel/commit/417178fb84 | 2.3.1 |
| [Improve][Connector-V2][File] Improve file connector option rule and document (#3812) | https://github.com/apache/seatunnel/commit/bd76077669 | 2.3.1 |
| [Hotfix][OssFile Connector]fix ossfile bug (#3684) | https://github.com/apache/seatunnel/commit/ba6259274d | 2.3.0 |
| [Feature][Connector-V2][Oss jindo] Add oss jindo source & sink connector (#3456) | https://github.com/apache/seatunnel/commit/2507372311 | 2.3.0 |