-
Notifications
You must be signed in to change notification settings - Fork 3
askhubadvisor
Daniel Larsson edited this page Feb 14, 2025
·
1 revision
Perform a query in the Qlik Sense hub insight advisor.
-
querysource
: The source from which queries will be randomly picked.-
file
: Read queries from file defined byfile
. -
querylist
: Read queries from list defined byquerylist
.
-
-
querylist
: A list of queries. Plain strings are supported and will get a weight of1
.-
weight
: A weight to set probablility of query being peformed. -
query
: A query sentence.
-
-
lang
: Query language. -
maxfollowup
: The maximum depth of followup queries asked. A value of0
means that a query from querysource is performed without followup queries. -
file
: Path to query file. -
app
: Optional name of app to pick in followup queries. If not set, a random app is picked. -
saveimages
: Save images of charts to file. -
saveimagefile
: File name of saved images. Defaults to server side file name. Supports Session Variables. -
thinktime
: Settings for thethinktime
action, which is automatically inserted before each followup. Defaults to a uniform distribution with mean=8 and deviation=4.-
type
: Type of think time-
static
: Static think time, defined bydelay
. -
uniform
: Random think time with uniform distribution, defined bymean
anddev
.
-
-
delay
: Delay (seconds), used with typestatic
. -
mean
: Mean (seconds), used with typeuniform
. -
dev
: Deviation (seconds) frommean
value, used with typeuniform
.
-
-
followuptypes
: A list of followup types enabled for followup queries. If omitted, all types are enabled.-
app
: Enable followup queries which change app. -
measure
: Enable followups based on measures. -
dimension
: Enable followups based on dimensions. -
recommendation
: Enable followups based on recommendations. -
sentence
: Enable followup queries based on bare sentences.
-
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "file",
"file": "queries.txt"
}
}
The file queries.txt
contains one query and an optional weight per line. The line format is [WEIGHT;]QUERY
.
show sales per country
5; what is the lowest price of shoes
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": ["show sales per country", "what is the lowest price of shoes"]
}
}
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": ["show sales per country", "what is the lowest price of shoes"],
"maxfollowup": 3
}
}
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": ["show sales per country", "what is the lowest price of shoes"],
"lang": "fr"
}
}
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": [
{
"query": "show sales per country",
"weight": 5,
},
"what is the lowest price of shoes"
]
}
}
See detailed examples of settings in the documentation for thinktime action.
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": [
"what is the lowest price of shoes"
],
"maxfollowup": 5,
"thinktime": {
"type": "static",
"delay": 5
}
}
}
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": [
"what is the lowest price of shoes"
],
"maxfollowup": 5,
"followuptypes": ["app"]
}
}
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": [
"show price per shoe type"
],
"maxfollowup": 5,
"saveimages": true
}
}
The saveimagefile
file name template setting supports
Session Variables.
You can apart from session variables include the following action local variables in the saveimagefile
file name template:
- .Local.ImageCount - the number of images written to file
- .Local.ServerFileName - the server side name of image file
- .Local.Query - the query sentence
- .Local.AppName - the name of app, if any app, where query is asked
- .Local.AppID - the id of app, if any app, where query is asked
{
"action": "AskHubAdvisor",
"settings": {
"querysource": "querylist",
"querylist": [
"show price per shoe type"
],
"maxfollowup": 5,
"saveimages": true,
"saveimagefile": "{{.Local.Query}}--app-{{.Local.AppName}}--user-{{.UserName}}--thread-{{.Thread}}--session-{{.Session}}"
}
}
This file has been automatically generated, do not edit manually