| Modifier and Type | Field and Description |
|---|---|
protected int |
batchsize
Field batchsize
|
protected PyObject |
bindings
Field bindings
|
protected java.util.Set |
exclude
Field exclude
|
protected PyDictionary |
indexedBindings
Field indexedBindings
|
protected PyList |
rows
Field rows
|
protected PyObject |
sql
Field sql
|
connection, cursor, dataHandler, tableName| Constructor and Description |
|---|
DBSink(PyConnection connection,
java.lang.Class dataHandler,
java.lang.String tableName,
PyObject exclude,
PyObject bindings,
int batchsize)
Constructor for handling the consumption of data.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createSql(PyObject row)
Create the insert statement given the header row.
|
void |
end()
Handles flushing any buffers and closes the cursor.
|
protected boolean |
excluded(PyObject key)
Return true if the key (converted to lowercase) is not found in the exclude list.
|
void |
row(PyObject row)
Handle the row.
|
void |
start()
Method start
|
protected PyObject sql
protected java.util.Set exclude
protected PyList rows
protected int batchsize
protected PyObject bindings
protected PyDictionary indexedBindings
public DBSink(PyConnection connection, java.lang.Class dataHandler, java.lang.String tableName, PyObject exclude, PyObject bindings, int batchsize)
connection - the database connectiondataHandler - a custom DataHandler for the cursor, can be NonetableName - the table to insert the dataexclude - the columns to be excluded from insertion on the destination, all if Nonebindings - the optional bindings for the destination, this allows morphing of types during the copybatchsize - the optional batchsize for the insertsprotected boolean excluded(PyObject key)
protected void createSql(PyObject row)
public void row(PyObject row)