类 JdbcInputFormat

  • 所有已实现的接口:
    Serializable

    public class JdbcInputFormat
    extends Object
    implements Serializable
    InputFormat to read data from a database and generate Rows. The InputFormat has to be configured using the supplied InputFormatBuilder. A valid RowTypeInfo must be properly configured in the builder
    另请参阅:
    序列化表格
    • 构造器详细资料

      • JdbcInputFormat

        public JdbcInputFormat​(JdbcSourceConfig config,
                               Map<org.apache.seatunnel.api.table.catalog.TablePath,​org.apache.seatunnel.api.table.catalog.CatalogTable> tables)
    • 方法详细资料

      • openInputFormat

        public void openInputFormat()
      • open

        public void open​(JdbcSourceSplit inputSplit)
                  throws IOException
        Connects to the source database and executes the query
        参数:
        inputSplit - which is ignored if this InputFormat is executed as a non-parallel source, a "hook" to the query parameters otherwise (using its parameterId)
        抛出:
        IOException - if there's an error during the execution of the query
      • close

        public void close()
                   throws IOException
        Closes all resources used.
        抛出:
        IOException - Indicates that a resource could not be closed.
      • reachedEnd

        public boolean reachedEnd()
        Checks whether all data has been read.
        返回:
        boolean value indication whether all data has been read.
      • nextRecord

        public org.apache.seatunnel.api.table.type.SeaTunnelRow nextRecord()
        Convert a row of data to seatunnelRow