Class AbstractLoadStep
java.lang.Object
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractLoadStep
- Direct Known Subclasses:
LoadViaDeleteStep
,LoadViaInsertOrUpdateStep
,LoadViaInsertStep
,LoadViaUpdateStep
,NoopLoadStep
,PauseQuartzJobsProcess
,ResumeQuartzJobsProcess
,RunRecordScriptLoadStep
Base class for the Load (aka, store) logic of Streamed ETL processes.
Records are to be read out of the input object's Records field, and after storing,
should be written to the output object's Records, noting that when running
as a streamed-ETL process, those input invalid input: '&' output objects will be instances of
the StreamedBackendStep{Input,Output} classes, that will be associated with
a page of records flowing through a pipe.
Also - use the transaction member variable!!!
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOverrideRecordPipeCapacity
(RunBackendStepInput runBackendStepInput) Allow this load step to specify the capacity of the pipe being used by the process.Getter for transactionGetter for transformStepopenTransaction
(RunBackendStepInput runBackendStepInput) void
postRun
(BackendStepPostRunInput runBackendStepInput, BackendStepPostRunOutput runBackendStepOutput) Allow subclasses to do an action after the run is complete - after the last page of records is passed in.void
preRun
(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Allow subclasses to do an action before any pages of records are processed.abstract void
runOnePage
(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Do the load logic for one page of recordsvoid
setTransaction
(Optional<QBackendTransaction> transaction) Setter for transactionvoid
setTransformStep
(AbstractTransformStep transformStep) Setter for transformStepwithTransformStep
(AbstractTransformStep transformStep) Fluent setter for transformStep
-
Field Details
-
session
-
-
Constructor Details
-
AbstractLoadStep
public AbstractLoadStep()
-
-
Method Details
-
runOnePage
public abstract void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Do the load logic for one page of records- Throws:
QException
-
preRun
public void preRun(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Allow subclasses to do an action before any pages of records are processed.- Throws:
QException
-
postRun
public void postRun(BackendStepPostRunInput runBackendStepInput, BackendStepPostRunOutput runBackendStepOutput) throws QException Allow subclasses to do an action after the run is complete - after the last page of records is passed in.- Throws:
QException
-
openTransaction
public Optional<QBackendTransaction> openTransaction(RunBackendStepInput runBackendStepInput) throws QException - Throws:
QException
-
setTransaction
Setter for transaction -
getTransaction
Getter for transaction -
getOverrideRecordPipeCapacity
Allow this load step to specify the capacity of the pipe being used by the process. The specific use-case for which this is being added is, in the case of a process with many records being extracted, if the load job is too slow, then the pipe can get filled, and the extractor (who puts records into the pipe) can time out waiting for capacity in the pipe to open up, while a slow loader is consuming the records. In other words, for a slow loader, setting a lower pipe capacity can help prevent time-out errors ("Giving up adding record to pipe...") -
getTransformStep
Getter for transformStep -
setTransformStep
Setter for transformStep -
withTransformStep
Fluent setter for transformStep
-