This entry explains how to configure an ETL chainset to transform/calculate parameter values before executing a database query. The example demonstrates adjusting START_DATE and END_DATE when REPORT_TYPE = 'M'.
1.MainChain Chain
The MainChain takes in the parameter values and controls the overall flow. It accepts JSON records with parameters (report name, report type, MIME type, start date, end date).
-
Equal Value - This step compares
REPORT_TYPEagainst'M'and outputs a boolean result (true/false). -
Chain If Else - Based on the result of the check, the record is routed into either the transformation chainset (02_If_Report) or the normal execution chainset (03_Else_Report). This ensures that only records with
REPORT_TYPE = 'M'undergo parameter modification. -
HTTP Endpoint – Returns the rendered results to the client, reflecting either transformed or original parameters depending on the input.
2. If_Report Chain
-
This chain is triggered when the condition
REPORT_TYPE = 'M'is met. It applies a series of Date Add/Subtract operations to calculate the previous month’s date range (with flexibility to adjust by day, month, or year depending on requirements). -
Once the adjusted values are computed, the adjusted
START_DATEandEND_DATEfields are discarded, and the original values are replaced with the new values.
3. Else_Report Chain
- Triggered when
REPORT_TYPE ≠ 'M'. This branch uses the existingSTART_DATEandEND_DATEvalues without modification, and the report executes with the original parameters.
Example input:
And its corresponding output:
The chainset and a sample RML file are attached to this guide for reference.
sample files.zip (3.0 KB)



