Function useExecuteQuery
useExecuteQuery(...
args):ExecuteQueryResult
React hook that executes a data query.
This approach, which offers an alternative to the ExecuteQuery component, is similar to React Query's useQuery hook.
Example
Execute a query to retrieve revenue per country per year from the Sample ECommerce data model. Then display the data in a table and column chart.
Additional useExecuteQuery() examples:
- Query with Sorting
- Take Control of Your Data Visualizations blog post with examples of using the hook to fetch data to display in third-party charts.
Parameters
| Parameter | Type |
|---|---|
...args | [ExecuteQueryParams] |
Returns
Query state that contains the status of the query execution, the result data, or the error if any occurred