onto.Birthdate
Definition
Some date attributes may refer to dates of birth and, by tagging them with extends: onto.Birthdate
, you will be able to ask questions
related to age and birthday.
Examples
- "Show me our oldest customer"
- "Average age of customers in each country"
- "Show me all employees with birthday next week"
- "Which customers were born before 1970?"
Usage
For this to work, you will have to add an extends: onto.Birthdate
. Like this:
kb {
class Customer {
name.en: "Customer"
from_table: customer
sql: "${customer.id}"
name_sql.en: "${customer.full_name}"
date Birthdate {
name.en: "Birthdate"
sql: "${customer.birthdate}"
datetime_format: DayFormat
// Add this to enable questions involving age and birthday
extends: onto.Birthdate
}
...
}
}