Skip to main content

Smart TimeSeries Target

The Smart TimeSeries target is a built-in automation target that triggers a Smart TimeSeries build whenever its input data changes. Like the Event Curve target, the build result fires data service actions that can trigger further automations downstream — making this target primarily useful as a link in a chained automation pipeline.

Built-in targets

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


timeseries — Build a Smart TimeSeries​

Inputs​

InputRequiredTypeDescription
timeseries✅SmartTimeSeriesThe ID of the Smart TimeSeries to build

This target only applies to the data service and the update action. Transformation and property overrides are not supported — the build logic is defined in the Smart TimeSeries configuration itself.


Using this target in an automation​

A typical use case is rebuilding a Smart TimeSeries whenever its underlying base data is updated:

//#region Rebuild a Smart TimeSeries when its base data is updated
ab = AutomationBuilder("data", "private", "MY_OBJECT:BASE_PRICE")
ab.addCondition("update")
ab.setTarget("timeseries")
ab.setProperty("timeseries", "MY_OBJECT:ADJUSTED_PRICE")
ab.icon = "graph-up"
ab.enabled = true
save ${automation:ab}
//#endregion

Chaining automations with Smart TimeSeries builds​

After the Smart TimeSeries is built, the platform fires a data service update action on the result. A second automation can react to this — for example to send a notification, publish to a queue, or trigger a report.

data:update (base)  →  [timeseries target]  →  Smart TimeSeries built  →  data:update (result)  →  [downstream target]
note

Because the Smart TimeSeries build fires a data:update action on the result timeseries, use the result timeseries ID as the condition id in any downstream automation — not the base data ID.

Example: rebuild and notify​

The following example rebuilds a Smart TimeSeries when base data changes, then sends an email notification when the rebuilt timeseries is updated:

//#region Stage 1 — rebuild Smart TimeSeries when base data changes
ab = AutomationBuilder("data", "private", "MY_OBJECT:BASE_PRICE")
ab.addCondition("update")
ab.setTarget("timeseries")
ab.setProperty("timeseries", "MY_OBJECT:ADJUSTED_PRICE")
ab.icon = "graph-up"
ab.enabled = true
save ${automation:ab}
//#endregion

//#region Stage 2 — notify when the Smart TimeSeries has been rebuilt
ab = AutomationBuilder("data", "private", "MY_OBJECT:ADJUSTED_PRICE")
ab.addCondition("update")
ab.setTarget("email")
ab.setProperty("to", "data-team@example.com")
ab.setProperty("subject", "Smart TimeSeries updated: MY_OBJECT:ADJUSTED_PRICE")
ab.icon = "envelope-at text-outlook"
ab.enabled = true
save ${automation:ab}
//#endregion

Example: rebuild and publish to a queue​

//#region Stage 1 — rebuild Smart TimeSeries when base data changes
ab = AutomationBuilder("data", "private", "MY_OBJECT:BASE_PRICE")
ab.addCondition("update")
ab.setTarget("timeseries")
ab.setProperty("timeseries", "MY_OBJECT:ADJUSTED_PRICE")
ab.icon = "graph-up"
ab.enabled = true
save ${automation:ab}
//#endregion

//#region Stage 2 — publish the rebuilt timeseries to a queue
ab = AutomationBuilder("data", "private", "MY_OBJECT:ADJUSTED_PRICE")
ab.addCondition("update")
ab.setTarget("queue_subject")
ab.setProperty("queue", "MY_DOWNSTREAM_QUEUE")
ab.setProperty("subject", "timeseries.update.MY_OBJECT.ADJUSTED_PRICE")
ab.icon = "send text-red"
ab.enabled = true
save ${automation:ab}
//#endregion

TargetBuildsAfter build firesTypical use
timeseriesSmart TimeSeriesdata:update on the resultRebuild derived timeseries when inputs change, then chain downstream
curveSmart CurveStores the resultRebuild and store a derived curve when inputs change
ecurveEvent Curvecurve service actionsRebuild an event-driven curve and chain downstream