扩展连接器

TODO 扩展数据连接器的方式,从 Connector trait 开始描述

数据连接器采用模块化、可扩展设计。对于 mass-connector 不支持的数据源,用户可以很方便的对系统进行扩展,支持自定义的数据源。

Connector

Connector trait是数据连接器的基础接口,设置自定义数据连接器是需要实现这个接口。

/**
 * Connector
 *  -> SQL, CSV, Excel ……
 *    Connector2(Source) ->
 *                       <-> Flow1, Flow2, .... <-> 算是DataElement
 *  -> Connector2(Sink)
 * 数据连接
 */
trait Connector extends AutoCloseable {
  /**
   * 连接名,由用户设置。在整个应用业务生命周期内应保持唯一。
   */
  def name: String

  /**
   * 连接类型。不同的连接类型具有不同的配置选项,数据存取方式
   */
  def `type`: ConnectorType

  def setting: ConnectorSetting

  def configuration: Configuration = setting.parameters
}
Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.