IExecuteInsightProps
Props of the ExecuteInsight component.
export interface IExecuteInsightProps extends IWithLoadingEvents<IExecuteInsightProps>
Extends: IWithLoadingEvents<IExecuteInsightProps>
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(Optional) Backend to execute against. | |||
(executionResult: WithLoadingResult) => ReactElement | null | Child component to which rendering is delegated. | ||
string | (Optional) Informative name of the component. | ||
string | ((def: IExecutionDefinition, props: IExecuteInsightProps) => string) | (Optional) Modify date formatting on prepared insight execution, before it’s executed. | ||
IDimension[] | ((def: IExecutionDefinition, props: IExecuteInsightProps) => IDimension[]) | (Optional) Modify dimensions on prepared insight execution, before it’s executed. | ||
boolean | (Optional) Optionally enable real execution cancellation. This means that if the execution request is not yet finished and the execution changes, the request will be cancelled and the new execution will be started. Default: false | ||
(Optional) Provide component for rendering of the error state. | |||
boolean | (Optional) Indicates that the execution to obtain the data for the insight should be an ’execution by reference'. Execution by reference means that the ExecuteInsight will ask analytical backend to compute results for an insight which is stored on the backend by specifying link to the insight, additional filters and description how to organize the data. Otherwise, a freeform execution is done, in which the InsightView will send to backend the full execution definition of what to compute. This distinction is in place because some backends MAY want to prohibit users from doing freeform executions and only allow computing data for set of insights created by admins. Note: the need for execute by reference is rare. You will typically be notified by the solution admin to use this mode. | ||
string | (Optional) Name to use for files exported from this component. | ||
(Optional) Filters to apply on server side. | |||
Reference to the insight for which you want to get the data view. | |||
(Optional) Provide component for rendering of the loading state. | |||
boolean | (Optional) Specifies whether | ||
ISortItem[] | ((def: IExecutionDefinition, props: IExecuteInsightProps) => ISortItem[]) | (Optional) Modify sorts on prepared insight execution, before it’s executed. | ||
(Optional) Specifies whether | |||
string | (Optional) Workspace in whose context to perform the execution. |
Property details
IExecuteInsightProps.backendproperty
Backend to execute against.
backend?: IAnalyticalBackend;
Remarks
Note: the backend must come either from this property or from BackendContext. If you do not specify backend here, then the executor MUST be rendered within an existing BackendContext.
IExecuteInsightProps.childrenproperty
Child component to which rendering is delegated.
children: (executionResult: WithLoadingResult) => ReactElement | null;
Remarks
This is a function that will be called every time state of execution and data loading changes.
IExecuteInsightProps.componentNameproperty
Informative name of the component.
componentName?: string;
Remarks
This value is sent as telemetry information together with the actual execution request. We recommend to set this because it can be useful for diagnostic purposes.
Defaults ‘Execute’.
IExecuteInsightProps.dateFormatproperty
Modify date formatting on prepared insight execution, before it’s executed.
dateFormat?: string | ((def: IExecutionDefinition, props: IExecuteInsightProps) => string);
IExecuteInsightProps.dimensionsproperty
Modify dimensions on prepared insight execution, before it’s executed.
dimensions?: IDimension[] | ((def: IExecutionDefinition, props: IExecuteInsightProps) => IDimension[]);
IExecuteInsightProps.enableExecutionCancellingproperty
Optionally enable real execution cancellation.
This means that if the execution request is not yet finished and the execution changes, the request will be cancelled and the new execution will be started.
Default: false
enableExecutionCancelling?: boolean;
IExecuteInsightProps.ErrorComponentproperty
Provide component for rendering of the error state.
ErrorComponent?: IExecuteErrorComponent;
Remarks
Note: When you provide both LoadingComponent and ErrorComponent, the children function with the execution result will be called only with a successful result.
IExecuteInsightProps.executeByReferenceproperty
Indicates that the execution to obtain the data for the insight should be an ’execution by reference'.
Execution by reference means that the ExecuteInsight will ask analytical backend to compute results for an insight which is stored on the backend by specifying link to the insight, additional filters and description how to organize the data.
Otherwise, a freeform execution is done, in which the InsightView will send to backend the full execution definition of what to compute.
This distinction is in place because some backends MAY want to prohibit users from doing freeform executions and only allow computing data for set of insights created by admins.
Note: the need for execute by reference is rare. You will typically be notified by the solution admin to use this mode.
executeByReference?: boolean;
IExecuteInsightProps.exportTitleproperty
Name to use for files exported from this component.
exportTitle?: string;
Remarks
If you do not specify this, then the componentName will be used instead.
Note: it is also possible to pass custom name to the export function that will be sent via the onExportReady callback. That approach is preferred if you need to assign the names in an ad-hoc fashion.
IExecuteInsightProps.filtersproperty
Filters to apply on server side.
filters?: INullableFilter[];
IExecuteInsightProps.insightproperty
Reference to the insight for which you want to get the data view.
insight: ObjRef;
IExecuteInsightProps.LoadingComponentproperty
Provide component for rendering of the loading state.
LoadingComponent?: IExecuteLoadingComponent;
Remarks
Note: When you provide both LoadingComponent and ErrorComponent, the children function with the execution result will be called only with a successful result.
IExecuteInsightProps.loadOnMountproperty
Specifies whether Execute should trigger execution and loading right after it is mounted.
loadOnMount?: boolean;
Remarks
If not specified defaults to true.
If set to false, then the function needs to be called to trigger the execution and loading.
IExecuteInsightProps.sortsproperty
Modify sorts on prepared insight execution, before it’s executed.
sorts?: ISortItem[] | ((def: IExecutionDefinition, props: IExecuteInsightProps) => ISortItem[]);
IExecuteInsightProps.windowproperty
Specifies whether Execute should load all data from backend or just a particular window - specified by offset and size of the window.
window?: DataViewWindow;
Remarks
If not specified, all data will be loaded.
IExecuteInsightProps.workspaceproperty
Workspace in whose context to perform the execution.
workspace?: string;
Remarks
Note: the workspace must come either from this property or from WorkspaceContext. If you do not specify workspace here, then the executor MUST be rendered within an existing WorkspaceContext.