# Function toExecuteQueryParams

toExecuteQueryParams(widgetModel): ExecuteQueryParams

Translates a WidgetModel to the parameters for executing a query for the widget.

# Parameters

Parameter Type
widgetModel WidgetModel

# Returns

ExecuteQueryParams

# Example

const widgetModel = await widgetService.getWidgetModel({
 dashboardOid: 'your-dashboard-oid',
 widgetOid: 'your-widget-oid'
});
const executeQueryParams = widgetModelTranslator.toExecuteQueryParams(widgetModel);
const queryResult = await queryService.executeQuery(executeQueryParams);

Note: this method is not supported for getting pivot query. Use toExecutePivotQueryParams instead for getting query parameters for the pivot widget.