public class LoadVectorwise extends CompositeOperator implements RecordSinkOperator
Limitations - When loading Vector 3.5,
When using the direct loading method within a cluster execution environment, the client can be executing on a platform not supported by the direct loader. However, the target execution environment must be supported by the direct loader. Currently, support is limited to Linux & Windows 64-bit platforms.
Constructor and Description |
---|
LoadVectorwise() |
Modifier and Type | Method and Description |
---|---|
protected void |
compose(CompositionContext ctx)
Compose the body of this operator.
|
int |
getBufferSize()
Gets the data buffer size (in rows).
|
String |
getCharset()
Get the character set used when staging and loading for vwload method for Vectorwise operator.
|
String |
getDatabaseName()
Get the database name.
|
String |
getFinalizeTableSQL()
Retrieves the SQL statement to execute after processing all the records.
|
String |
getHost()
Get the server host name property.
|
String |
getInitializeTableSQL()
Retrieves the SQL statement to execute before processing any records.
|
RecordPort |
getInput()
Gets the record port providing the input data to the sink.
|
String |
getInstance()
Get the Vectorwise instance name.
|
int |
getMaxErrors()
Get the maximum number of errors allowed.
|
LoadMethod |
getMethod()
Get the load method in use.
|
String |
getPassword()
Get the password.
|
String |
getRejectsPath()
Get the rejects path.
|
Map<String,String> |
getRenameMapping()
Get the source to target field mapping.
|
boolean |
getRollback()
Get whether rollback is enabled or disabled.
|
String |
getSchema()
Get the target schema name.
|
boolean |
getStringTruncationError()
Get whether errors on string truncation is enabled or disabled.
|
String |
getTableName()
Get the target table name.
|
String |
getUser()
Get the user account name.
|
void |
setBufferSize(int bufferSize)
Sets the size of the data buffer (in rows) used to cache data before sending to the Vectorwise engine.
|
void |
setCharset(String charsetName)
Set the character set used for data staging and loading for vwload load method.
|
void |
setDatabaseName(String databaseName)
Set the database name.
|
void |
setFinalizeTableSQL(String finalizeTableSQL)
Sets the SQL statement to execute after processing all the records.
|
void |
setHost(String hostName)
Set the host name property.
|
void |
setInitializeTableSQL(String initializeTableSQL)
Sets the SQL statement to execute before processing any records.
|
void |
setInstance(String instance)
Set the Vectorwise instance name.
|
void |
setMaxErrors(int maxErrors)
Set the maximum number of errors allowed before rolling back the data load operation.
|
void |
setMethod(LoadMethod method)
Set the load method to use.
|
void |
setPassword(String password)
Set the user's password.
|
void |
setRejectsPath(String rejectsPath)
Set the rejects path.
|
void |
setRenameMapping(Map<String,String> renameMapping)
Set a rename mapping.
|
void |
setRollback(boolean enabled)
Enable or disable rollback processing.
|
void |
setSchema(String schema)
Set the schema for the target table.
|
void |
setStringTruncationError(boolean enableStringTruncationError)
Set whether errors on string truncation is enabled or disabled.
|
void |
setTableName(String tableName)
Set the name of the table to load.
|
void |
setUser(String userName)
Set the user name.
|
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public RecordPort getInput()
RecordSinkOperator
getInput
in interface RecordSinkOperator
getInput
in interface SinkOperator<RecordPort>
public String getHost()
public void setHost(String hostName)
hostName
- Vectorwise server host namepublic String getInstance()
public void setInstance(String instance)
instanceName
- instance namepublic String getDatabaseName()
public void setDatabaseName(String databaseName)
databaseName
- database namepublic String getTableName()
public void setTableName(String tableName)
tableName
- target table name.public String getUser()
public void setUser(String userName)
When using the vwload load method, the user name is not always needed. The vwload utility has to be executed by the DBA user. The user name and password supplied is for a user account that has write/copy access to the target table.
userName
- user account namepublic String getPassword()
public void setPassword(String password)
When using the vwload load method, the password is not always needed. The vwload utility has to be executed by the DBA user. The user name and password supplied is for a user account that has write/copy access to the target table.
password
- public Map<String,String> getRenameMapping()
public void setRenameMapping(Map<String,String> renameMapping)
This is an optional property. If not provided, the input fields are mapped to the target database table by schema order.
renameMapping
- the mapping from old to new names.public String getRejectsPath()
public void setRejectsPath(String rejectsPath)
rejectsPath
- target path namepublic int getMaxErrors()
public void setMaxErrors(int maxErrors)
maxErrors
- maximum errors allowedpublic LoadMethod getMethod()
public void setMethod(LoadMethod method)
mode
- load method (vwload is the default)public boolean getRollback()
public void setBufferSize(int bufferSize)
bufferSize
- data buffer size in rowspublic int getBufferSize()
public void setRollback(boolean enabled)
If disabled, the operation is still aborted when the maximum number of errors has been encountered. However, the data load is not rolled back. Any data successfully loaded will appear in the target table.
rollback
- enable (true) or disable (false) rollbackpublic String getInitializeTableSQL()
public void setInitializeTableSQL(String initializeTableSQL)
CREATE TABLE
statement to create the table.
This statement is executed only once, regardless of #partitionCount
.
initializeTableSQL
- the SQL statement to execute before processing any recordspublic String getFinalizeTableSQL()
public void setFinalizeTableSQL(String finalizeTableSQL)
CREATE INDEX
statement.
This statement is executed only once, regardless of #partitionCount
.
finalizeTableSQL
- the SQL statement to execute after processing all the recordspublic boolean getStringTruncationError()
public void setStringTruncationError(boolean enableStringTruncationError)
stringTruncationError
- enable(true) or disable(false) errors on string truncationpublic void setSchema(String schema)
DIRECT
method of loading and a user/password is not required. The schema is used to generate the
actual table name within the Vector system.schema
- schema of the target tablepublic String getSchema()
public void setCharset(String charsetName)
charsetName
- character set used when staging and loading for vwload methodpublic String getCharset()
protected void compose(CompositionContext ctx)
CompositeOperator
OperatorComposable.add(O)
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 portscompose
in class CompositeOperator
ctx
- the contextCopyright © 2016 Actian Corporation. All rights reserved.