[英]How to pass dynamic values in sql in cube.js schema?
我想要狀態= 2或狀態<3的地方。 如何通過將動態值傳遞給 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`
}
}
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.