I need a complex filter which based on the documentation I need to use segments. The filter that I want to achieve is gonna be look like these:
segments: {
notMemberExcept: {
sql: `(
${CUBE}.user_id NOT IN (
SELECT user_id FROM members
) OR ${CUBE.userId} IN ($ValueFromUser) )`,
},
},
This where clause is important to be like that because previously I used alternative SQL that complied with CubeJS implementation but turns out it's gonna be a performance issue.
The problem is how I get the value from API in cube schema?
Problem
I need a complex filter which based on the documentation I need to use
segments
. The filter that I want to achieve is gonna be look like these:This where clause is important to be like that because previously I used alternative SQL that complied with CubeJS implementation but turns out it's gonna be a performance issue.
The problem is how I get the value from API in cube schema?
Related Cube.js schema