Skip to main content

Report Target

The report target is a built-in automation target that runs a named report whenever an automation condition fires. Two variants are available — one that runs the report with its default configuration, and one that runs it over a specific date range.

Built-in targets

Built-in targets are provided by OpenDataDSL and referenced using the @ prefix on their script name (e.g. @ReportTarget). They are available to all tenants without any additional configuration.


Available report targets​

CodeNameDescription
reportRun a reportRuns the report using its default configuration
report_rangeRun a report with a rangeRuns the report over a specified date range

Both targets use the same @ReportTarget script. Transformation is not supported — report formatting is controlled by the report configuration itself.


report — Run a report​

Use this target to run a report automatically whenever a triggering event occurs, using the report's own default date range and parameters.

Inputs​

InputRequiredDescription
report✅The name of the report to run

Using this target in an automation​

//#region Run a daily summary report when a dataset completes
ab = AutomationBuilder("dataset", "private", "MY_PROVIDER.FEED.PRODUCT")
ab.addCondition("complete")
ab.setTarget("report")
ab.setProperty("report", "MY_DAILY_SUMMARY_REPORT")
ab.icon = "file-text text-onenote"
ab.enabled = true
save ${automation:ab}
//#endregion

report_range — Run a report with a range​

Use this target when the report should be scoped to a specific date range rather than its default. This is useful for reports that need to reflect a particular delivery window, or where the range differs from the report's configured default.

Inputs​

InputRequiredTypeDescription
report✅The name of the report to run
range✅rangeThe date range to run the report over

Using this target in an automation​

//#region Run a curve report for a specific range when a curve build succeeds
ab = AutomationBuilder("curve", "private", "MY_CURVE_OBJECT:CLOSE")
ab.addCondition("success")
ab.setTarget("report_range")
ab.setProperty("report", "MY_CURVE_REPORT")
ab.setProperty("range", "between -5d and today")
ab.icon = "file-text text-onenote"
ab.enabled = true
save ${automation:ab}
//#endregion

Using a report target in a pipeline​

Report targets fit naturally at the end of a data pipeline, generating output once data has been validated and is confirmed ready. Because a report run fires report service actions on completion (success, warning, failed), a further automation can then deliver the report — for example by email or to a queue.

dataset:complete  →  [report target]  →  Report runs  →  report:success  →  [email / queue target]

The following example runs a report when a dataset completes, then emails it to a distribution list when the report succeeds:

//#region Stage 1 — run the report when the dataset completes
ab = AutomationBuilder("dataset", "private", "MY_PROVIDER.FEED.PRODUCT")
ab.addCondition("complete")
ab.setTarget("report")
ab.setProperty("report", "MY_DAILY_SUMMARY_REPORT")
ab.icon = "file-text text-onenote"
ab.enabled = true
save ${automation:ab}
//#endregion

//#region Stage 2 — email the report when it succeeds
ab = AutomationBuilder("report", "private", "MY_DAILY_SUMMARY_REPORT")
ab.addCondition("success")
ab.setTarget("email_attachment")
ab.setProperty("to", "distribution@example.com")
ab.setProperty("subject", "Daily Summary Report")
ab.setProperty("attachmentName", "DailySummary_${yyyyMMdd}.pdf")
ab.icon = "envelope-paper text-outlook"
ab.enabled = true
save ${automation:ab}
//#endregion
Handling report failures

Add a parallel automation on the failed action of the report service to notify your team or raise a JIRA task if a report does not complete successfully.


Pre-configured report target​

If the same report is always triggered by a particular event, you can create a custom target with the report name pre-filled:

//#region Create a pre-configured target for a specific report
at = AutomationTarget()
at.publisher = "myorg"
at.code = "run-daily-summary"
at.name = "Run the Daily Summary Report"
at.description = "Runs the daily summary report"
at.icon = "file-text text-onenote"
at.script = "@ReportTarget"
at.template = "run the daily summary report"
at.allowTransformation = false
at.allowPropertyChange = true
at.services = ["dataset"]
at.actions = ["complete"]

at.properties.report = "MY_DAILY_SUMMARY_REPORT"

at.tags = ["Report"]
save at
//#endregion

Once saved, automations using run-daily-summary require no additional properties:

//#region Use the pre-configured report target
ab = AutomationBuilder("dataset", "private", "MY_PROVIDER.FEED.PRODUCT")
ab.addCondition("complete")
ab.setTarget("run-daily-summary")
ab.icon = "file-text text-onenote"
ab.enabled = true
save ${automation:ab}
//#endregion

Choosing between the two targets​

reportreport_range
Date rangeReport defaultConfigurable per automation
Best forReports with a fixed or self-calculating rangeReports that need a specific window per trigger event
Transformer support❌❌