Skip to content

Conversation

@morgan-at-cube
Copy link
Contributor

FILTER_PARAMS should always be used in this use case to avoid a massive cross join. I also added a simpler code snippet that is easier to adapt to any use case rather than the original verbose version. cc @paco-valdez who I consulted on this approach.

Check List

  • Tests have been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

[For example #12]

Description of Changes Made (if issue reference is not provided)

[Description goes here]

FILTER_PARAMS should always be used in this use case to avoid a massive cross join. I also added a simpler code snippet that is easier to adapt to any use case rather than the original verbose version.
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Mar 24, 2025
type: count
filters:
- sql: "gender = 'female' and city = city_filter"
- sql: "gender = 'female'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's missing the closing double quote:

 - sql: "gender = 'female'"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Thanks for catching!! Added it back

@igorlukanin igorlukanin merged commit 09a94cb into cube-js:master Apr 8, 2025
1 check passed
@igorlukanin igorlukanin added the docs Issues that require a documentation improvement label Apr 8, 2025
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
* Update passing-dynamic-parameters-in-a-query.mdx

FILTER_PARAMS should always be used in this use case to avoid a massive cross join. I also added a simpler code snippet that is easier to adapt to any use case rather than the original verbose version.

* Update passing-dynamic-parameters-in-a-query.mdx

Fix missing quote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Issues that require a documentation improvement pr:community Contribution from Cube.js community members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants