Home > @gooddata/sdk-model > newDefForInsight
Prepares a new execution definition for the provided insight.
export declare function newDefForInsight(workspace: string, insight: IInsightDefinition, filters?: INullableFilter): IExecutionDefinition;
|workspace||string||workspace to execute against, must not be empty|
|insight||IInsightDefinition||insight to create execution for, must have buckets which must have some attributes or measures in them|
|filters||INullableFilter||(Optional) optional, may not be provided|
Buckets with attributes and measures WILL be used to obtain attributes and measures - the behavior WILL be same as in forBuckets() function. Filters, sort by and totals in the insight WILL be included in the prepared execution.
Additionally, an optional list of additional filters WILL be merged with the filters already defined in the insight.
- Attributes and measures from insight's buckets are distributed into definition attributes and measures in natural order. - Insight filters are added into definition - Insight sorts are added into definition - Insight totals are added into definition
This function MUST be used to implement IExecutionFactory.forInsight();