This entry guide will show you how to render a RML template with parameters using the ETL module. Attached FruitSales.zip file contains the DS, Composite DS and RML sample that was used for this guideline.
Save the FruitSales.ds in below repository
Save the FruitSalesWithParam.ds and FruitSalesWithParam.rml under below repository
- Go to ETL module
- Create new ETL chainset e.g Render Report and leave the Copy Form as a default value
- Add a new Chains e.g Run Report and leave the Copy From value as a default
- Add a new Steps - JSON Record
- Edit the JSON Record steps as below. Under Merge Order field select ‘Upstream overrides this’ and under JSON parameter field key in as below:
"rml" : "/User/admin/FruitSalesWithParam.rml",
"mimeType" : "application/pdf",
"Fruit" : "Apple"
- Next is to add the Ambience RML runtime step
- Leave all value as default in Edit Step
- Final step is to add another step called HTTP Endpoint
- On Edit Step, leave all as a default and save it.
- Run the step and you will see the log result in Results field
- Below are the link to visit the endpoint result
http://localhost:1730/etl/endpoint-bytes/Render Report/Run Report
You can POST to this endpoint to override the Fruit (for example using cURL or PostMan)
FruitSales.zip (3.1 KB)