类 JdbcInputFormat
- java.lang.Object
-
- org.apache.seatunnel.connectors.seatunnel.jdbc.internal.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(JdbcSourceConfig config, Map<org.apache.seatunnel.api.table.catalog.TablePath,org.apache.seatunnel.api.table.catalog.CatalogTable> tables)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Closes all resources used.voidcloseInputFormat()org.apache.seatunnel.api.table.type.SeaTunnelRownextRecord()Convert a row of data to seatunnelRowvoidopen(JdbcSourceSplit inputSplit)Connects to the source database and executes the queryvoidopenInputFormat()booleanreachedEnd()Checks whether all data has been read.
-
-
-
构造器详细资料
-
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()
-
closeInputFormat
public void closeInputFormat() throws IOException- 抛出:
IOException
-
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 IOExceptionCloses 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
-
-