cube-js / cube

📊 Cube — The Semantic Layer for Building Data Applications
https://cube.dev
Other
17.88k stars 1.77k forks source link

Filtering problems with external joins #7887

Open zoujun-41239828 opened 7 months ago

zoujun-41239828 commented 7 months ago

Problem When I join A's Cube to B's Cube, I pass FILTER_PARAMS to B's Cube to narrow down B's query result set. In this case, the outermost query generated by the Cube will bring the filter condition of this parameter, but in my case, I don't need it to bring this filter condition. What can I do A clear and concise description of what the problem is. Ex. How can I do X with Cube.js? [...] For example, I might just want to return a field in B's Cube that tells me the status of this record, but that field also forces me to use FILTER_PARAMS to narrow down the query result set in B's Cube, forcing me to add a filter condition at the top level so that only the result set can be obtained for that condition. But now I need all the data Related Cube.js schema

cube(`Cube`, {
  sql: `` //, ...
})

Related Cube.js generated SQL

SELECT * FROM ...
igorlukanin commented 7 months ago

Hi @zoujun-41239828 👋

Not sure I fully understand what is the mismatch between your expectations and what is really happening. Could you please provide more context?