File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
docs/pages/product/data-modeling/reference Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,58 @@ cubes:
330330
331331</CodeTabs>
332332
333+ ### ` order`
334+
335+ The `order` parameter specifies the default sort order for a dimension. Valid
336+ values are `asc` (ascending) and `desc` (descending). This parameter is optional.
337+
338+ When set, the dimension's default sort order is exposed via
339+ [APIs and integrations][ref-apis]. Consuming applications, such as BI tools
340+ and custom frontends, can use this metadata to apply consistent default sorting
341+ when displaying dimension values, ensuring a uniform user experience across
342+ different tools connected to the semantic layer.
343+
344+ <CodeTabs>
345+
346+ ` ` ` javascript
347+ cube(` orders`, {
348+ // ...
349+
350+ dimensions : {
351+ status : {
352+ sql : ` status` ,
353+ type : ` string` ,
354+ order : ` asc`
355+ },
356+
357+ created_at : {
358+ sql : ` created_at` ,
359+ type : ` time` ,
360+ order : ` desc`
361+ }
362+ }
363+ })
364+ ```
365+
366+ ``` yaml
367+ cubes :
368+ - name : orders
369+ # ...
370+
371+ dimensions :
372+ - name : status
373+ sql : status
374+ type : string
375+ order : asc
376+
377+ - name : created_at
378+ sql : created_at
379+ type : time
380+ order : desc
381+ ` ` `
382+
383+ </CodeTabs>
384+
333385### ` primary_key`
334386
335387Specify if a dimension is a primary key for a cube. The default value is
You can’t perform that action at this time.
0 commit comments