Skip to main content

Curve Build Targets

The curve build targets are built-in automation targets that trigger curve builds in response to data changes. Two variants are available — one for Smart Curves and one for Event Curves — each with different behaviour after the build completes.

Built-in targets

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

Available curve targets​

CodeNameScriptDescription
curveBuild a Smart Curve@CurveTargetBuilds and stores the Smart Curve result
ecurveBuild an Event Curve@EventCurveTargetBuilds the Event Curve and fires automations on the result

curve — Build a Smart Curve​

Use this target to trigger a Smart Curve build whenever input data changes. The built curve is calculated and stored, making the updated result immediately available for reporting and downstream consumers.

Inputs​

InputRequiredTypeDescription
curve✅SmartCurveThe ID of the Smart Curve to build

Using this target in an automation​

A typical use case is rebuilding a Smart Curve whenever the underlying base data is updated:

//#region Rebuild a Smart Curve when its base data is updated
ab = AutomationBuilder("data", "private", "MY_CURVE_OBJECT:BASE_PRICE")
ab.addCondition("update")
ab.setTarget("curve")
ab.setProperty("curve", "MY_CURVE_OBJECT:SMART_PRICE")
ab.icon = "graph-up text-success"
ab.enabled = true
save ${automation:ab}
//#endregion
note

allowTransformation and allowPropertyChange are both disabled for this target. The curve build process is fully managed by the platform and does not support pre-processing or property overrides.


ecurve — Build an Event Curve​

Use this target to trigger an Event Curve build whenever related event data or base data changes. Unlike the Smart Curve target, the Event Curve target does not simply store the result — after the build completes, the platform fires automations on the resulting curve. This means the ecurve target is typically the first step in a chained automation pipeline.

Inputs​

InputRequiredTypeDescription
curve✅EventCurveThe ID of the Event Curve to build

Using this target in an automation​

A typical use case is rebuilding an Event Curve when new trade events arrive, which then triggers a downstream notification or storage automation via the curve's own success or failed action:

//#region Rebuild an Event Curve when trade events are updated
ab = AutomationBuilder("event", "private", "MY_OBJECT:TRADES")
ab.addCondition("update")
ab.setTarget("ecurve")
ab.setProperty("curve", "MY_OBJECT:CURVE")
ab.icon = "graph-up-arrow text-primary"
ab.enabled = true
save ${automation:ab}
//#endregion

Chaining automations with curve builds​

Automations can trigger actions that themselves trigger further automations. This makes it straightforward to build multi-step reactive pipelines where each stage hands off to the next.

Smart Curve pipeline​

When base data is updated, an automation can rebuild a Smart Curve. Because the curve build itself fires curve service actions (success, warning, failed), a second automation can react to the build result — for example by sending a notification or writing the curve to storage.

Data updated  →  [curve target]  →  Smart Curve stored  →  curve:success  →  [email / blob target]
//#region Step 1 — rebuild Smart Curve when base data changes
ab = AutomationBuilder("data", "private", "MY_CURVE_OBJECT:BASE_PRICE")
ab.addCondition("update")
ab.setTarget("curve")
ab.setProperty("curve", "MY_CURVE_OBJECT:SMART_PRICE")
ab.icon = "graph-up text-success"
ab.enabled = true
save ${automation:ab}
//#endregion

//#region Step 2 — notify when the Smart Curve build succeeds
ab = AutomationBuilder("curve", "private", "MY_CURVE_OBJECT:SMART_PRICE")
ab.addCondition("success")
ab.setTarget("email")
ab.setProperty("to", "curves-team@example.com")
ab.setProperty("subject", "Smart Curve ready: MY_CURVE_OBJECT:SMART_PRICE")
ab.icon = "envelope-at text-outlook"
ab.enabled = true
save ${automation:ab}
//#endregion

Event Curve pipeline​

When events are updated, an automation triggers an Event Curve build. The build result fires a curve service action, which a second automation can use to write the result to storage or send a notification.

Event updated  →  [ecurve target]  →  Event Curve built  →  curve:success  →  [blob / email target]
//#region Step 1 — rebuild Event Curve when trade events are updated
ab = AutomationBuilder("event", "private", "MY_OBJECT:TRADES")
ab.addCondition("update")
ab.setTarget("ecurve")
ab.setProperty("curve", "MY_OBJECT:CURVE")
ab.icon = "graph-up-arrow text-primary"
ab.enabled = true
save ${automation:ab}
//#endregion

//#region Step 2 — write the built curve to Azure Blob on success
ab = AutomationBuilder("curve", "private", "MY_OBJECT:CURVE")
ab.addCondition("success")
ab.setTarget("blob")
ab.setProperty("storage", "https://mystorageaccount.blob.core.windows.net")
ab.setProperty("container", "curves")
ab.setProperty("path", "MY_OBJECT/${yyyy}/${MM}/${dd}/CURVE.csv")
ab.icon = "database text-success"
ab.enabled = true
save ${automation:ab}
//#endregion
Reacting to build failures

You can add a parallel automation on the failed action of the curve service to alert your team if a build goes wrong — without interfering with the success path.


Choosing between the two targets​

curveecurve
Curve typeSmart CurveEvent Curve
Trigger servicedataevent, data
After buildStores the resultFires curve service automations on the result
Typical useKeep derived curves up to date when inputs changeDrive downstream pipelines from event-based curve builds
Icongraph-up text-successgraph-up-arrow text-primary