This topic describes how to call an ETL task from within another ETL process by using a <taskref> that refers to org.labkey.di.steps.QueueJobTask.
QueueJobTask Reference
Reference the ETL process you wish to queue up by module name and file name, using the pattern "{MODULE_NAME}/FILE_NAME". For example, to queue up the process MaleNC.xml in the module etlmodule, use the following:
<transforms>
...
<transform id="QueueTail" type="TaskrefTransformStep">
<taskref ref="org.labkey.di.steps.QueueJobTask">
<settings>
<setting name="transformId" value="{MODULE-NAME}/MaleNC"/>
</settings>
</taskref>
</transform>
...
</transforms>
An ETL process can also queue itself by omitting the <setting> element:
<transform id="requeueNlpTransfer" type="TaskrefTransformStep">
<taskref ref="org.labkey.di.steps.QueueJobTask"/>
</transform>
Standalone vs. Component ETL Processes
ETL processes can be set as either "standalone" or "sub-component":
- Standalone ETL processes:
- Appear in the Data Transforms web part
- Can be run directly via the user or via another ETL
- Sub-Component ETL processes or tasks:
- Not shown in the Data Transforms web part
- Cannot be run directly by the user, but can be run only by another ETL process, as a sub-component of a wider job.
- Cannot be enabled or run directly via an API call.
To configure as a sub-component, set the ETL "standalone" attribute to false. By default the standalone attribute is true.
<etl xmlns="http://labkey.org/etl/xml" standalone="false">
...
</etl>
Reference Generated Files
If you expect a file output from one ETL to be shared/consumed by a different ETL in a sequence, all ETLs in the chain must use the
loadReferencedFiles attribute. Learn more here:
Related Topics