Class MonetDbBulkLoader
- java.lang.Object
-
- org.apache.hop.pipeline.transform.BaseTransform<MonetDbBulkLoaderMeta,MonetDbBulkLoaderData>
-
- org.apache.hop.pipeline.transforms.monetdbbulkloader.MonetDbBulkLoader
-
- All Implemented Interfaces:
IExtensionData,IHasLogChannel,ILoggingObject,IVariables,IEngineComponent,ITransform
public class MonetDbBulkLoader extends BaseTransform<MonetDbBulkLoaderMeta,MonetDbBulkLoaderData>
-
-
Field Summary
-
Fields inherited from class org.apache.hop.pipeline.transform.BaseTransform
data, deadLockCounter, executionEndDate, executionStartDate, extensionDataMap, first, firstRowReadDate, initStartDate, lastRowWrittenDate, log, meta, metadataProvider, rowListeners, safeStopped, terminator, terminatorRows, variables
-
-
Constructor Summary
Constructors Constructor Description MonetDbBulkLoader(TransformMeta transformMeta, MonetDbBulkLoaderMeta meta, MonetDbBulkLoaderData data, int copyNr, PipelineMeta pipelineMeta, Pipeline pipeline)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRowToBuffer(IRowMeta rowMeta, Object[] r)voidautoAdjustSchema(MonetDbBulkLoaderMeta meta)voiddrop()protected StringescapeOsPath(String path, boolean isWindows)booleanexecute(MonetDbBulkLoaderMeta meta)protected voidexecuteSql(String query)protected static voidexecuteSql(String query, String host, int port, String user, String password, String db)MonetDbBulkLoaderDatagetData()protected org.monetdb.mcl.net.MapiSocketgetMonetDBConnection()protected static org.monetdb.mcl.net.MapiSocketgetMonetDBConnection(String host, int port, String user, String password, String db)protected static org.monetdb.mcl.net.MapiSocketgetMonetDBConnection(String host, int port, String user, String password, String db, ILogChannel log)booleaninit()booleanprocessRow()voidtruncate()protected voidverifyDatabaseConnection()protected voidwriteBufferToMonetDB(DatabaseMeta dm)protected voidwriteRowToMonetDB(IRowMeta rowMeta, Object[] r, DatabaseMeta dm)-
Methods inherited from class org.apache.hop.pipeline.transform.BaseTransform
addResultFile, addRowListener, addRowSetToInputRowSets, addRowSetToOutputRowSets, addTransformFinishedListener, addTransformStartedListener, batchComplete, canProcessOneRow, checkFeedback, cleanup, clearInputRowSets, clearOutputRowSets, closeQuietly, copyFrom, decrementLinesRead, decrementLinesWritten, dispatch, dispose, findInputRowSet, findInputRowSet, findOutputRowSet, findOutputRowSet, finishBundle, getContainerId, getCopy, getCopyNr, getCurrentInputRowSetNr, getCurrentOutputRowSetNr, getDispatcher, getErrorRowMeta, getErrors, getExecutionDuration, getExecutionEndDate, getExecutionStartDate, getExtensionDataMap, getFilename, getFirstInputRowSet, getFirstRowReadDate, getInitStartDate, getInputBufferSize, getInputRowMeta, getInputRowSets, getLastRowWrittenDate, getLinesInput, getLinesOutput, getLinesRead, getLinesRejected, getLinesSkipped, getLinesUpdated, getLinesWritten, getLogChannel, getLogChannelId, getLogLevel, getLogText, getMeta, getMetadataProvider, getName, getObjectCopy, getObjectName, getObjectType, getOutputBufferSize, getOutputRowSets, getParent, getParentVariables, getPartitionId, getPartitionTargets, getPipeline, getPipelineMeta, getPreviewRowMeta, getProcessed, getRegistrationDate, getRepartitioning, getResultFiles, getRow, getRowFrom, getRowHandler, getRowListeners, getStatus, getStatusDescription, getTransformFinishedListeners, getTransformMeta, getTransformName, getTransformPluginId, getTransformStartedListeners, getVariable, getVariable, getVariableBoolean, getVariableNames, handleGetRowFrom, handlePutError, handlePutRowTo, identifyErrorOutput, incrementLinesInput, incrementLinesOutput, incrementLinesRead, incrementLinesRejected, incrementLinesSkipped, incrementLinesUpdated, incrementLinesWritten, initBeforeStart, initializeFrom, isAllowEmptyFieldNamesAndTypes, isBasic, isDebug, isDetailed, isDistributed, isForcingSeparateLogging, isGatheringMetrics, isInitialising, isMapping, isPartitioned, isPaused, isRowLevel, isRunning, isSafeStopped, isSelected, isStopped, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, logSummary, markStart, markStop, outputIsDone, pauseRunning, putError, putRow, putRowTo, removeRowListener, resolve, resolve, resolve, resumeRunning, rowsetInputSize, rowsetOutputSize, safeModeChecking, safeModeChecking, setAllowEmptyFieldNamesAndTypes, setCarteObjectId, setCopy, setCopyNr, setCurrentInputRowSetNr, setCurrentOutputRowSetNr, setDistributed, setErrorRowMeta, setErrors, setExecutionEndDate, setExecutionStartDate, setFirstRowReadDate, setForcingSeparateLogging, setGatheringMetrics, setInitStartDate, setInputRowMeta, setInputRowSets, setInternalVariables, setLastRowWrittenDate, setLinesInput, setLinesOutput, setLinesRead, setLinesRejected, setLinesSkipped, setLinesUpdated, setLinesWritten, setLogLevel, setMetadataProvider, setOutputDone, setOutputRowSets, setParentVariables, setPartitioned, setPartitionId, setPartitionTargets, setPaused, setPaused, setPreviewRowMeta, setRepartitioning, setRowHandler, setRunning, setSafeStopped, setStopped, setTransformFinishedListeners, setTransformName, setTransformStartedListeners, setVariable, setVariables, shareWith, startBundle, stopAll, stopRunning, swapFirstInputRowSetIfExists, toString, waitUntilPipelineIsStarted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hop.pipeline.transform.ITransform
subStatuses
-
-
-
-
Constructor Detail
-
MonetDbBulkLoader
public MonetDbBulkLoader(TransformMeta transformMeta, MonetDbBulkLoaderMeta meta, MonetDbBulkLoaderData data, int copyNr, PipelineMeta pipelineMeta, Pipeline pipeline)
-
-
Method Detail
-
execute
public boolean execute(MonetDbBulkLoaderMeta meta) throws HopException
- Throws:
HopException
-
processRow
public boolean processRow() throws HopException- Specified by:
processRowin interfaceITransform- Overrides:
processRowin classBaseTransform<MonetDbBulkLoaderMeta,MonetDbBulkLoaderData>- Throws:
HopException
-
writeRowToMonetDB
protected void writeRowToMonetDB(IRowMeta rowMeta, Object[] r, DatabaseMeta dm) throws HopException
- Throws:
HopException
-
addRowToBuffer
protected void addRowToBuffer(IRowMeta rowMeta, Object[] r) throws HopException
- Throws:
HopException
-
truncate
public void truncate() throws HopException- Throws:
HopException
-
drop
public void drop() throws HopException- Throws:
HopException
-
autoAdjustSchema
public void autoAdjustSchema(MonetDbBulkLoaderMeta meta) throws HopException
- Throws:
HopException
-
writeBufferToMonetDB
protected void writeBufferToMonetDB(DatabaseMeta dm) throws HopException
- Throws:
HopException
-
verifyDatabaseConnection
protected void verifyDatabaseConnection() throws HopException- Throws:
HopException
-
init
public boolean init()
- Specified by:
initin interfaceITransform- Overrides:
initin classBaseTransform<MonetDbBulkLoaderMeta,MonetDbBulkLoaderData>
-
getData
public MonetDbBulkLoaderData getData()
- Specified by:
getDatain interfaceITransform- Overrides:
getDatain classBaseTransform<MonetDbBulkLoaderMeta,MonetDbBulkLoaderData>
-
getMonetDBConnection
protected org.monetdb.mcl.net.MapiSocket getMonetDBConnection() throws Exception- Throws:
Exception
-
getMonetDBConnection
protected static org.monetdb.mcl.net.MapiSocket getMonetDBConnection(String host, int port, String user, String password, String db) throws Exception
- Throws:
Exception
-
getMonetDBConnection
protected static org.monetdb.mcl.net.MapiSocket getMonetDBConnection(String host, int port, String user, String password, String db, ILogChannel log) throws Exception
- Throws:
Exception
-
-