forInsight()
Home > @gooddata/sdk-backend-spi > IExecutionFactory > forInsight
IExecutionFactory.forInsight() method
Prepares a new execution for the provided insight.
Signature:
forInsight(insightDefinition: IInsightDefinition, filters?: INullableFilter[]): IPreparedExecution;
Parameters
Parameter | Type | Description |
---|---|---|
insightDefinition | IInsightDefinition | insight definition to create execution for, must have buckets which must have some attributes or measures in them |
filters | INullableFilter[] | (Optional) optional, may not be provided, may contain null or undefined values which must be ignored |
Returns:
Remarks
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.
The contract is that prepared executions created by this method MUST be executable and MUST come with pre-filled dimensions greated using the defaultDimensionsGenerator().