Function useGetNlqResult Beta
useGetNlqResult(...
args):UseGetNlqResultState
React hook that enables natural language query (NLQ) against a data model or perspective.
Parameters
| Parameter | Type |
|---|---|
...args | [UseGetNlqResultParams] |
Returns
NLQ load state that contains the status of the execution, the result (data) as WidgetProps
Example
const { data, isLoading } = useGetNlqResult({
dataSource: 'Sample ECommerce',
query: 'Show me total revenue by age range'
});
if (isLoading) {
return <div>Loading...</div>;
}
return (
{
data &&
<Widget {...data} />
}
);