public class JDBCOutputFormat extends AbstractJDBCOutputFormat<org.apache.flink.types.Row>
Row,
DriverManager,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCOutputFormat.JDBCOutputFormatBuilder
Builder for a
JDBCOutputFormat. |
connection, dbURL| Constructor and Description |
|---|
JDBCOutputFormat(String username,
String password,
String drivername,
String dbURL,
String query,
int batchInterval,
int[] typesArray) |
| Modifier and Type | Method and Description |
|---|---|
static JDBCOutputFormat.JDBCOutputFormatBuilder |
buildJDBCOutputFormat() |
void |
close()
Executes prepared statement and closes all resources of this instance.
|
void |
open(int taskNumber,
int numTasks)
Connects to the target database and initializes the prepared statement.
|
void |
writeRecord(org.apache.flink.types.Row row) |
closeDbConnection, configure, establishConnectionpublic void open(int taskNumber,
int numTasks)
throws IOException
taskNumber - The number of the parallel instance.IOException - Thrown, if the output could not be opened due to an
I/O problem.public void writeRecord(org.apache.flink.types.Row row)
throws IOException
IOExceptionpublic void close()
throws IOException
IOException - Thrown, if the input could not be closed properly.public static JDBCOutputFormat.JDBCOutputFormatBuilder buildJDBCOutputFormat()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.