Skip to main content

display_name

Definition

Every concept in the Knowledge Base layer can have a display_name or a name.

The way you should think about display_name is as a name that gets displayed to the user in titles, filters, autocomplete and the Knowledge Graph view. However, unlike name, if a user uses it in a question, it won't get necessarily picked as this concept.

Let's go over one example: a relationship from_Customer between kb.Order and kb.Customer.

kb {

class Order {

...

relationship from_Customer {
// the default if nothing set is "with"
display_name.en: "from"

to: kb.Customer
sql: "${ORDERS.customer_id}"
}
}

}

If we ask a question like "How many orders did JP make last year?", we want to see the filter Order from Customer JP in the answer. With display_name (and name) you can achieve that.

However, if we ask a question like "How many orders from Brazil?", the fact that we use the word "from" should not make Veezoo pick this relationship. This is why in this case we prefer the usage of display_name than name.

Usually, a display_name is not set explicitly for relationships. In this case, the default is simply 'with' (or the equivalent in the other languages).

Usage

The property display_name can be used in class, relationship, attributes and entity, but often it is only used for relationship.

It is a single String value per language (no Array is allowed) and is defined with a language tag (en for English, it for Italian, de for German, fr for French or all for all languages).

Example:

kb {

class Order {

...

relationship from_Customer {
display_name.en: "from"

to: kb.Customer
sql: "${ORDERS.customer_id}"
}
}

}