Export Group Target
The export group target runs an export group whenever an automation fires, so that the data in the group is exported as soon as it changes.
| Id | Name | Template | Icon |
|---|---|---|---|
odsl.export_group | Export a group of data | run export task for [group] | folder-symlink text-stream |
The target works with any service and any action. It supports property-change filtering but not @transformer.
Inputs​
| Input | Description |
|---|---|
group | The name of the export group to run |
How it works​
The export group named in group is run for the ondate of the triggering data, when there is one. See Curve Exports for how export groups are set up.
Example: run an export group when a dataset is complete​
- ODSL
- REST API
a = AutomationBuilder("dataset", "private", "MY.PROVIDER.FEED").build()
c = SimpleObject()
c.source = "private"
c.service = "dataset"
c.id = "MY.PROVIDER.FEED"
c.action = "complete"
conds = []
conds.add(c)
a.conditions = conds
a.target = "odsl.export_group"
a.template = "When 'MY.PROVIDER.FEED' is complete, run export task for [group]"
a.icon = "folder-symlink text-stream"
a.properties.group = "DAILY_SETTLEMENT_EXPORT"
a.enabled = true
save ${automation:a}
POST https://api.opendatadsl.com/api/automation/v1
{
"target": "odsl.export_group",
"template": "When 'MY.PROVIDER.FEED' is complete, run export task for [group]",
"icon": "folder-symlink text-stream",
"enabled": true,
"conditions": [
{
"source": "private",
"service": "dataset",
"id": "MY.PROVIDER.FEED",
"action": "complete"
}
],
"properties": {
"group": "DAILY_SETTLEMENT_EXPORT"
}
}
Example: run an export group when a curve is updated​
- ODSL
- REST API
a = AutomationBuilder("data", "private", "MY_OBJECT:CURVE").build()
c = SimpleObject()
c.source = "private"
c.service = "data"
c.id = "MY_OBJECT:CURVE"
c.action = "update"
conds = []
conds.add(c)
a.conditions = conds
a.target = "odsl.export_group"
a.template = "When 'MY_OBJECT:CURVE' is updated, run export task for [group]"
a.icon = "folder-symlink text-stream"
a.properties.group = "DAILY_SETTLEMENT_EXPORT"
a.enabled = true
save ${automation:a}
POST https://api.opendatadsl.com/api/automation/v1
{
"target": "odsl.export_group",
"template": "When 'MY_OBJECT:CURVE' is updated, run export task for [group]",
"icon": "folder-symlink text-stream",
"enabled": true,
"conditions": [
{
"source": "private",
"service": "data",
"id": "MY_OBJECT:CURVE",
"action": "update"
}
],
"properties": {
"group": "DAILY_SETTLEMENT_EXPORT"
}
}
Several triggers, several exports
If you create an export group automation on several items that are updated at the same time, the whole group is exported once for each of them. Where possible, trigger the export from a single upstream event, such as the dataset that drives all the data in the group.
Related pages​
- Curve Build Targets: how Smart and Event Curves are built
- TimeSeries Build Targets: how Smart and Event TimeSeries are built
- Azure Storage Targets: another way to deliver data to storage
- Automation Basics: how automations work, conditions and templates
- Creating Automations: step-by-step guide to setting up automations
- Automation Targets: overview of all available targets