newDefForBuckets()
Home > @gooddata/sdk-model > newDefForBuckets
newDefForBuckets() function
Prepares a new execution definition for a list of buckets.
Signature:
export declare function newDefForBuckets(workspace: string, buckets: IBucket[], filters?: INullableFilter[]): IExecutionDefinition;
Parameters
Parameter | Type | Description |
---|---|---|
workspace | string | workspace to execute against, must not be empty |
buckets | IBucket[] | list of buckets with attributes and measures, must be non empty, must have at least one attr or measure |
filters | INullableFilter[] | (Optional) optional, may not be provided |
Returns:
Remarks
Attributes and measures WILL be transferred to the execution in natural order:
- Order of items within a bucket is retained in the execution - Items from first bucket appear before items from second bucket
Or more specifically, given two buckets with items as [A1, A2, M1] and [A3, M2, M3], the resulting prepared execution WILL have definition with attributes = [A1, A2, A3] and measures = [M1, M2, M3]
This function MUST be used to implement IExecutionFactory.forBuckets();