Attributes
Definition
Attributes are data properties (or dimensions/measures) of a class and they can be of the following types: number
, integer
, date
, boolean
, string
and class
as well.
There is no keyword attribute
in VKL, you just use directly the type.
Example:
A boolean
attribute of the class Order
.
import: [
db.postgres.movie_db.public.ORDERS
]
kb {
class Order {
...
boolean Returned {
name.en: "Returned"
sql: "${ORDERS.returned} = 'yes'"
}
}
}
Check out the docs for each kind of attribute:
And for special ontologies using extends
: