java.lang.Object
com.pervasive.datarush.operators.AbstractLogicalOperator
com.pervasive.datarush.operators.CompositeOperator
com.pervasive.datarush.operators.io.jdbc.JDBCOperator
com.pervasive.datarush.operators.io.jdbc.AbstractWriteToJDBC
com.pervasive.datarush.operators.io.jdbc.WriteToJDBC
- All Implemented Interfaces:
ConnectionSettings,LogicalOperator
In its simplest form, writes records from an input port to a JDBC target
table using insert statements.
Initial and
final SQL
statements can be provided. The initial statement is run before any input
data is handled. The final statement is executed after all input data has
been processed. The initial statement must be provided when this operator is
used in OVERWRITETABLE mode.
Note that the WriteToJDBC operator is parallelized. Each parallel
instance will open a separate connection to the target database. To limit the
number of database connections used by this operator, tune down the operator parallelism level.
To set the parallelism level create an OperatorSettings instance with
maximum parallelism set to the wanted level. The operator settings can then be
passed as a parameter to the
LogicalGraph#add(com.pervasive.datarush.operators.LogicalOperator, OperatorSettings)
method.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pervasive.datarush.operators.io.jdbc.AbstractWriteToJDBC
AbstractWriteToJDBC.AbstractWriteHelper, AbstractWriteToJDBC.AbstractWriteToJDBCWorker, AbstractWriteToJDBC.SqlWriteProperties -
Field Summary
Fields inherited from class com.pervasive.datarush.operators.io.jdbc.AbstractWriteToJDBC
commitInterval, finalizeTableSQL, initializeTableSQL, input, isolationLevel, keyNames, renameMapping -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCompose the body of this operator.Methods inherited from class com.pervasive.datarush.operators.io.jdbc.AbstractWriteToJDBC
appendDelimited, buildDeleteStatement, buildInsertStatement, buildUpdateStatement, createDropTableSQL, createTruncateTableSQL, getCommitInterval, getFinalizeTableSQL, getInitializeTableSQL, getInput, getIsolationLevel, getKeyNameList, getKeyNames, getRenameMapping, guessTableName, setCommitInterval, setFinalizeTableSQL, setInitializeTableSQL, setIsolationLevel, setKeyNames, setRenameMappingMethods inherited from class com.pervasive.datarush.operators.io.jdbc.JDBCOperator
getConnectionFactory, getDriverName, getErrorAction, getHostNames, getJDBCConnector, getPassword, getSqlWarningLimit, getTableName, getUrl, getUser, setConnectionFactory, setDriverName, setErrorAction, setHostNames, setHostNames, setJDBCConnector, setPassword, setSqlWarningLimit, setTableName, setUrl, setUserMethods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
Constructor Details
-
WriteToJDBC
public WriteToJDBC()Default constructor. -
WriteToJDBC
Copy constructor.- Parameters:
other- the other instance ofWriteToJDBC
-
-
Method Details
-
compose
Description copied from class:CompositeOperatorCompose the body of this operator. Implementations should do the following:- Perform any validation of configuration, input types, etc
- Instantiate and configure sub-operators, adding them to the provided context via
the method
OperatorComposable.add(O) - Create necessary connections via the method
OperatorComposable.connect(P, P). This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
- Specified by:
composein classCompositeOperator- Parameters:
ctx- the context
-