Skip to main content

Ordinal Class


In Veezoo, you can model ordinal classes, which have a defined ordering for their entities. Examples of ordinal classes include age groups, difficulties, or priorities. Modeling ordinal classes helps create more intuitive visualizations and, in the future, will allow answering questions that involve ordering.

Modeling Ordinal Classes

To model an ordinal class, add the tag: KB_Ordinal to the class definition. For example, here is the definition for the Priority class:

class Priority {
name.en: "Priority"
tag: KB_Ordinal
sql: "${issue.priority}"

Annotating Entities with Order

For each entity in the ordinal class, you need to manually annotate them with a sort_id that determines their order. Here's an example for the Priority class:

kb.Priority {

entity Low {
name.en: "Low"
id: "Low"
sort_id: 0

entity Medium {
name.en: "Medium"
id: "Medium"
sort_id: 1

entity High {
name.en: "High"
id: "High"
sort_id: 2


In this example, we assign a sort_id to each entity within the Priority class. Lower sort_id values indicate lower priority, and higher values indicate higher priority. This ordering will be used when visualizing data in charts.


Modeling ordinal classes in Veezoo provides the following benefits:

  1. Intuitive visualizations: By defining a natural ordering for ordinal classes, the visualizations created in Veezoo will be more intuitive and easier to interpret.
  2. Future question-answering capabilities: In the future, Veezoo aims to support answering questions that involve the ordinal ordering, such as "Show me all issues with priority higher than Low."


Currently, Veezoo does not support the following features for ordinal classes:

  1. Answering questions involving ordinal ordering (e.g., "Show me all issues with priority higher than Low").
  2. Reversing the ordinal ordering in the frontend, such as in tables.