Creates a summary field by aggregating data from a foreign table onto a primary table.
| Key | Value(s) | Description |
|---|---|---|
| method | "BuildAggregate" | Creates a summary field by aggregating data from a foreign table onto a primary table. |
| project | "#project#" | |
| targetTable | "tableName" | required. Table on which to create the field. |
| source | "SourceTableName.SourceFieldName" | Required. Full name of field to aggregate. |
| function | "min/max/sum/count/avg" |
|
| name | "FieldName" | Required. |
| dataSet | {} | Optional. If provided, source field will be filtered to include only records in the dataset. |
| overwrite | true/false | Optional. Default = false If true, existing field will be over-written. If false and field exists, error will be raised. |
| forceLong | true/false |
{
"method": "BuildAggregate",
"project": "MyProject",
"targetTable": "customer",
"source": "transactions.profit",
"overwrite": true,
"name": "total profit",
"function": "sum"
}{
"method": "BuildAggregate",
"project": "#project#",
"targetTable": "",
"source": "",
"function": "",
"name": "",
"dataSet": {},
"overwrite": false,
"forceLong": false
}