Wiki source code of Requête en langage naturel

Last modified by Aurelie Bertrand on 2025/02/07 10:09

Hide last authors
abertrand 23.10 1 {{ddtoc/}}
jhurst 1.1 2
Aurelie Bertrand 54.1 3 = Prerequisites =
abertrand 29.1 4
Aurelie Bertrand 54.1 5 * Cubes in your wallets recently synchronized
abertrand 12.2 6
Aurelie Bertrand 54.1 7 = Creating flows with text query =
jhurst 1.1 8
Aurelie Bertrand 54.1 9 Digdash offers the possibility to create flows in some clicks with natural language.
jhurst 1.1 10
Aurelie Bertrand 54.1 11 * Via the dashboards editor
jhurst 1.1 12
Aurelie Bertrand 54.1 13 |[[image:text_query_en_html_f2d69e963b6dfe7b.png||height="177" width="275"]]
14 |**Dashboards editor **>** Creating new graphics **>** In natural language**
15 |[[image:text_query_en_html_d3b55a8e10123fdd.png||height="207" width="266"]]
16 |In the showing dialog, you can enter you query in the search bar.
17 |[[image:text_query_en_html_98fd1f57c633562.png||height="184" width="318"]]
18 |Choose a flow in the results list (we are going to pick the first one)
19 |[[image:text_query_en_html_c8e99a6b1e0bc9e9.png||height="170" width="355"]]
20 |And save the flow in the current wallet.
21 |[[image:text_query_en_html_cddc52d001b3a1e9.png||height="213" width="355"]]
22 |Give a name to your flow.
23 |[[image:text_query_en_html_f70ed4175e1093f9.png||height="175" width="355"]]
24 |The new flow will be added to your dashboard editor and you will find it in the existing graphics list.
jhurst 1.1 25
Aurelie Bertrand 54.1 26 * Via the dashboard
jhurst 1.1 27
Aurelie Bertrand 54.1 28 It is also possible to add a « Text query » element in your dashboard in order to create flows on the fly.
abertrand 12.6 29
Aurelie Bertrand 54.1 30 |[[image:text_query_en_html_21e80dc5c36d4220.png||height="468" width="202"]]
31 |**Dashboards editor **>** Additional content **>** Elements **>** Text query**
32 |[[image:text_query_en_html_f940b7f7ead63723.png||height="223" width="325"]]
33 |Add the element in your dashboard editor.
34 |[[image:text_query_en_html_81f6639240d4c264.png||height="193" width="288"]]
35 |(((
36 According to your query, you may filter on some measures/dimensions.
abertrand 12.2 37
Aurelie Bertrand 54.1 38 You would better have a « Filtered elements » element in your dashboard to remove these filters for the potential next queries.
jhurst 1.1 39
Aurelie Bertrand 54.1 40 **Dashboard editors **>** Additional content **>** Elements **>** Filtered elements**
41 )))
42 |[[image:text_query_en_html_758db70155096f91.png||height="123" width="325"]]
43 |You will find those elements dashboard side.
jhurst 1.1 44
Aurelie Bertrand 54.1 45 {{{
46 }}}
abertrand 12.7 47
Aurelie Bertrand 54.1 48 = Composition of a text query =
abertrand 12.7 49
Aurelie Bertrand 54.1 50 Digdash allows you to create flows from data models in natural language.
jhurst 1.1 51
Aurelie Bertrand 54.1 52 Digdash mainly rests on keywords to suggest you the most relevant flows and the names of your data models’ columns.
jhurst 1.1 53
Aurelie Bertrand 54.1 54 So a query is basically composed of measures names from your data model and/or dimensions names, followed (or not) by flows names and/or sorting operations.
jhurst 1.1 55
Aurelie Bertrand 54.1 56 We shall later explain how important query terms are important.
jhurst 1.1 57
Aurelie Bertrand 54.1 58 = Results for a text query =
jhurst 1.1 59
Aurelie Bertrand 54.1 60 [[image:text_query_en_html_c7eda020d25db863.png||height="117" width="550"]]
61
jhurst 1.1 62
Aurelie Bertrand 54.1 63 //__Screenshot: Results for a text query__//
jhurst 1.1 64
Aurelie Bertrand 54.1 65 Results for a text query are presented in list, with its associated flow, sorted by its relevance and a score. The more the score is high, the more the suggested flow is considered as relevant. Also, the cube name is mentioned so is a description of the flow.
jhurst 1.1 66
Aurelie Bertrand 54.1 67 We shall later see in this document which are the criteria that could have an influence on the score of a result.
jhurst 1.1 68
Aurelie Bertrand 54.1 69 = Choices of graphics =
jhurst 1.1 70
Aurelie Bertrand 54.1 71 For a given query, you will be suggested a list of results of multiple graphics, depending on your query members.
jhurst 1.1 72
Aurelie Bertrand 54.1 73 Nevertheless, you can require a particular graphic, as long as it remains coherent (the query « Cost in line » has no sense).
jhurst 1.1 74
Aurelie Bertrand 54.1 75 The numbers of members for a cube has an incidence. Indeed, when a query, even coherent, has too many members to show, you will be suggested a more adapted graphic.
jhurst 1.1 76
Aurelie Bertrand 54.1 77 Here are the keywords to use for the choice of graphics:
jhurst 1.1 78
Aurelie Bertrand 54.1 79 |**Charts name**|**Keywords**
80 |Pie chart|« pie »
81 |Gauge|« gauge »
82 |Progress bar|« progress bar »
83 |Energy bars|« energy »
84 |Arrow indicator|« arrow »
85 |Column chart|(((
86 « column »
jhurst 1.1 87
Aurelie Bertrand 54.1 88 « histogram »
jhurst 1.1 89 )))
Aurelie Bertrand 54.1 90 |Bar chart|« bar »
91 |Map chart|« map »
92 |Scatter chart|« scatter »
93 |Bubble chart|« bubble »
94 |Line chart|« line »
95 |Zone chart|(((
96 « area »
jhurst 1.1 97
Aurelie Bertrand 54.1 98 « zone »
jhurst 1.1 99 )))
Aurelie Bertrand 54.1 100 |Radar chart|« radar »
101 |Tab chart|« table »
102 |Indicator|« indicator »
103 |{{glossaryReference glossaryId="Glossary" entryId="Tableau croisé"}}Cross table{{/glossaryReference}}|« cross table »
104 |Text chart|« text »
jhurst 1.1 105
Aurelie Bertrand 54.1 106 //__Table presenting keywords for the different flows__//
jhurst 1.1 107
Aurelie Bertrand 54.1 108 = Sorting =
jhurst 1.1 109
Aurelie Bertrand 54.1 110 It is possible for you to use sorting operations with the following keywords :
jhurst 1.1 111
Aurelie Bertrand 54.1 112 |**Sorting**|**Keywords**|**Queries examples**
113 |Ascending|(((
114 « sort » (ascending)
jhurst 1.1 115
Aurelie Bertrand 54.1 116 « sorted » (ascending)
jhurst 1.1 117
Aurelie Bertrand 54.1 118 « ascending »
119 )))|(((
120 « Cost by region in France in 2006 sorted by cost in table »
jhurst 1.1 121
Aurelie Bertrand 54.1 122 «  Cost by region in France in 2006 sorted in table »
jhurst 1.1 123
Aurelie Bertrand 54.1 124 «  Cost by region in France in 2006 ascending in table »
jhurst 1.1 125
Aurelie Bertrand 54.1 126 «  Cost by region in France in 2006 sorted in ascending order in table »
127 )))
128 |Descending|(((
129 « sort » (descending)
130
131 « sorted » (descending)
132
133 « descending »
jhurst 1.1 134 )))|(((
Aurelie Bertrand 54.1 135 «  Cost by region in France in 2006 sorted by cost in table »
jhurst 1.1 136
Aurelie Bertrand 54.1 137 «  Cost by region in France in 2006 descending in table »
jhurst 1.1 138
Aurelie Bertrand 54.1 139 «  Cost by region in France in 2006 sorted in descending order in table »
jhurst 1.1 140 )))
141
Aurelie Bertrand 54.1 142 //__Table presenting keywords for sorting operations__//
jhurst 1.1 143
144
Aurelie Bertrand 54.1 145 = Trend of a measure =
jhurst 1.1 146
Aurelie Bertrand 54.1 147 A measure has a trend. It can be stable (trend by default), increasing or decreasing:
jhurst 1.1 148
Aurelie Bertrand 54.1 149 {{{
150 }}}
jhurst 1.1 151
Aurelie Bertrand 54.1 152 |**Tendance**|**Signification**
153 |STABLE|Default trend: The bigger the better
154 |INCREASING|(((
155 The bigger the better
jhurst 1.1 156
Aurelie Bertrand 54.1 157 //Example : for a quality//
158 )))
159 |DECREASING|(((
160 The lowest the better
jhurst 1.1 161
Aurelie Bertrand 54.1 162 //Example : for a cost//
jhurst 1.1 163 )))
164
Aurelie Bertrand 54.1 165 __//Table presenting possible trends for a measure//__
jhurst 1.1 166
Aurelie Bertrand 54.1 167 You can change the trend of a measure via the Digdash Enterprise Studio, in the data source advanced configuration, in the properties part of a measure.
jhurst 1.1 168
169
Aurelie Bertrand 54.1 170 //__Definition of a measure’s trend in Digdash’s Studio Enterprise__//
jhurst 1.1 171
Aurelie Bertrand 54.1 172 * Impact of a measure’s trend
jhurst 1.1 173
Aurelie Bertrand 54.1 174 Trend has an impact on the sorting order. Indeed, if the type of sorting is not explicitly mentioned, the kind of sorting will be based on the measure’s trend. Consequently, we will get an ascending sort for a stable or increasing trend and a descending sort for a decreasing trend.
jhurst 1.1 175
176
177
Aurelie Bertrand 54.1 178 |**Trend**|**Queries examples**|**Sort**
179 |STABLE|(((
180 « Duration by state sorted »
jhurst 1.1 181
Aurelie Bertrand 54.1 182 Duration is a measure with a stable trend
183 )))|//The sorting of measure Duration on dimension state will be descendant//
184 |INCREASING|(((
185 « Quality by state sorted »
jhurst 1.1 186
Aurelie Bertrand 54.1 187 Quality is a measure with an increasing trend
188 )))|//The sorting of measure Quality on dimension state will be descendant//
189 |DECREASING|(((
190 « Cost by state sorted »
jhurst 1.1 191
Aurelie Bertrand 54.1 192 Cost is a measure with a decreasing trend
193 )))|//The sorting of measure Cost on dimension state will be ascendant//
jhurst 1.1 194
Aurelie Bertrand 54.1 195 //__Table with examples presenting impact of a measure’s trend on sorting orders__//
jhurst 1.1 196
Aurelie Bertrand 54.1 197 {{{
198 }}}
jhurst 1.1 199
Aurelie Bertrand 54.1 200 = The best / the worst, the top / bottom =
201
202 It is possible to get the X best/worst members of the results of your query using these keywords:
203
204 |**Cases**|**Keywords**|**Example**
205 |The X best|(((
jhurst 1.1 206 « Top »
207
Aurelie Bertrand 54.1 208 « biggest »
jhurst 1.1 209
Aurelie Bertrand 54.1 210 « best »
jhurst 1.1 211 )))|(((
Aurelie Bertrand 54.1 212 The best cost in France
jhurst 1.1 213
Aurelie Bertrand 54.1 214 The 5 best costs in 2016
jhurst 1.1 215
Aurelie Bertrand 54.1 216 The 2 biggest costs in Europe
jhurst 1.1 217
Aurelie Bertrand 54.1 218 Top 3 of costs in France in 2016
jhurst 1.1 219 )))
Aurelie Bertrand 54.1 220 |The X worst|(((
221 « Worst »
jhurst 1.1 222
Aurelie Bertrand 54.1 223 « bottom »
jhurst 1.1 224
Aurelie Bertrand 54.1 225 « smallest »
jhurst 1.1 226 )))|(((
Aurelie Bertrand 54.1 227 The worst cost in France
jhurst 1.1 228
Aurelie Bertrand 54.1 229 The 5 worst costs in 2016
jhurst 1.1 230
Aurelie Bertrand 54.1 231 The 2 smallest costs in Europe
jhurst 1.1 232 )))
233
Aurelie Bertrand 54.1 234 //__Table presenting keywords for best/worst, top/bottom__//
jhurst 1.1 235
236
Aurelie Bertrand 54.1 237 = Aggregation =
jhurst 1.1 238
Aurelie Bertrand 54.1 239 You can define an aggregation method for the measures of your query using these keywords :
jhurst 1.1 240
Aurelie Bertrand 54.1 241 |**Aggregation**|**Keywords**|**Queries examples**
242 |Sum|« sum »|« Sum of cost »
243 |Average|« average »|« Average of cost »
244 |Minimum|« min »|« Min of cost  »
245 |Maximum|« max »|« Max of cost  »
jhurst 1.1 246
Aurelie Bertrand 54.1 247 //__Table presenting keywords for aggregation__//
jhurst 1.1 248
249
Aurelie Bertrand 54.1 250 = Targets =
abertrand 23.4 251
Aurelie Bertrand 54.1 252 It is possible to apply targets on measures mentioning the following keyword :
abertrand 23.4 253
Aurelie Bertrand 54.1 254
255 |**Keyword**
256 |« target »
257
258 __//Table presenting the keyword for targets//__
259
260
261 You can also directly mention the name of the targets you want to apply.
262
263
264 |**Example**
265 |Given a data model with the following columns(((
266 |**Dimensions**|**Measures**
267 |Date|Quality
268 |Type of line|Cost (with target « Targ »)
jhurst 1.1 269 )))
Aurelie Bertrand 54.1 270 |(((
271 Example 1 : « Cost in gauge with target »
jhurst 1.1 272
Aurelie Bertrand 54.1 273 * Every measure has one target applied on it.
jhurst 1.1 274
Aurelie Bertrand 54.1 275 Example 2 : « Cost in gauge avec Obj »
jhurst 1.1 276
Aurelie Bertrand 54.1 277 * The target « Targ » is applied on the associated measure « Cost ».
278 )))
jhurst 1.1 279
Aurelie Bertrand 54.1 280 __//Table with example presenting the use of target in text query//__
jhurst 1.1 281
282
Aurelie Bertrand 54.1 283 = Use of synonyms =
jhurst 1.1 284
Aurelie Bertrand 54.1 285 Text query takes in charge synonyms of your query members.
jhurst 1.1 286
Aurelie Bertrand 54.1 287 == Creating synonyms dictionaries ==
jhurst 1.1 288
Aurelie Bertrand 54.1 289 To use synonyms in text query, you first need to import a synonyms dictionary in Digdash.
jhurst 1.1 290
Aurelie Bertrand 54.1 291 Please refer to the documentation called « synonyms_dictionary_en.pdf » to import a synonyms dictionary in Digdash.
jhurst 1.1 292
Aurelie Bertrand 54.1 293 == Activating synonyms dictionaries ==
abertrand 20.1 294
Aurelie Bertrand 54.1 295 You then need to check if the use of synonyms dictionaries is activated for text query in the server configuration.
abertrand 23.4 296
Aurelie Bertrand 54.1 297 [[image:text_query_en_html_d057beaef5d1f988.png||height="238" width="444"]]
298 \\
299
300 [[image:text_query_en_html_f1d5ad7376929373.png||height="241" width="413"]]
301 \\
302
303 In the server configuration page, at the bottom of the page > **Advanced >>** > Category **Synonyms dictionaries** > Checkbox **Use synonyms dictionaries for text query**
304
305 [[image:text_query_en_html_f1e4eedd6b1df4.png||height="114" width="508"]]
306 \\
307
308 //__Screenshot: Activation of the use of synonyms dictionaries for text query__//
309
310 == Use case ==
311
312 |**Example**
313 |Given a data model with the following columns(((
314 |**Dimensions**|**Measures**
315 |Date|Quality
316 |Type of line|Cost
jhurst 1.1 317 )))
Aurelie Bertrand 54.1 318 |(((
319 In that case, the query
jhurst 1.1 320
Aurelie Bertrand 54.1 321 « Price by sort of line »
jhurst 1.1 322
Aurelie Bertrand 54.1 323 is equivalent to th query
324
325 « Cost by type of line »
326
327 (« price » is a synonym of « cost » and « sort » is a synonym of « type »).
328
329 __**NB**__ : This is valid only if your synonyms dictionaries contains these synonyms.
jhurst 1.1 330 )))
331
Aurelie Bertrand 54.1 332 //__Table with example presenting a use case of text query with synonyms__//
abertrand 12.2 333
Aurelie Bertrand 54.1 334 = Scores for a result of a text query =
abertrand 12.2 335
Aurelie Bertrand 54.1 336 Queries results are ordered according to their relevance and the best score can reach a 5 out of 5.
abertrand 12.2 337
Aurelie Bertrand 54.1 338 The score for a result may vary for different reasons.
abertrand 12.2 339
Aurelie Bertrand 54.1 340 * Importance of the query members
jhurst 1.1 341
Aurelie Bertrand 54.1 342 Indeed, a result will be better marked if the query is composed of the exact columns’ names of your data models.
jhurst 1.1 343
Aurelie Bertrand 54.1 344 A query is then considered as less good if it contains partial names of your columns, or synonyms.
345
346 |(% colspan="3" %)**Example**
347 |(% colspan="3" %)Given a data model with these columns(((
348 |**Dimensions**|**Measures**
349 |Date|Quality
350 |Type of line|Cost
351
352
jhurst 1.1 353 )))
354 |(((
Aurelie Bertrand 54.1 355 **Query 1 :**
jhurst 1.1 356
Aurelie Bertrand 54.1 357 **With the exact names**
jhurst 1.1 358 )))|(((
Aurelie Bertrand 54.1 359 **Query 2 :**
jhurst 1.1 360
Aurelie Bertrand 54.1 361 **With partial names**
jhurst 1.1 362 )))|(((
Aurelie Bertrand 54.1 363 **Query 3 :**
jhurst 1.1 364
Aurelie Bertrand 54.1 365 **With synonyms**
jhurst 1.1 366 )))
Aurelie Bertrand 54.1 367 |« Cost by type of line »|« Cost by type »|« Price by sort of line »
368 |With only exact terms, the results can be well-marked.|With partial names, the results can be less well-marked.|(((
369 « price » is a synonym of « cost », « sort of line » is a synonym of « type of line ».
jhurst 1.1 370
Aurelie Bertrand 54.1 371 This query is different from the original query, the score will be low.
jhurst 1.1 372 )))
373 |Score* : 5/5|Score* : 3/5|Score* : 2/5
Aurelie Bertrand 54.1 374 |(% colspan="3" %)* indicated scoes are just to illustrate our example
jhurst 1.1 375
Aurelie Bertrand 54.1 376 //__Table with example presenting how important query members are important__//
jhurst 1.1 377
Aurelie Bertrand 54.1 378 * Importance of the suggested type of graphics
379
380 The results list for a query suggests graphics more or less relevant for what is expected. Given the nature of the query members, some flows will be considered less relevant, hence a lower score for them.
381
382
383