Somewhere I want status=2 or status<3. Instead of writing separate schemas, how to reuse by passing dynamic values to the status field in SQL?
cube(`OrderFacts`, {
sql: `SELECT * FROM orders WHERE status>3`, // <--- I want to pass dynamic values to the condition
measures: {
count: {
type: `count`
}
},
dimensions: {
date: {
sql: `date`,
type: `time`
}
}
});