Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tableau: CASE WHEN support for WHERE query section #7601

Closed
svdimchenko opened this issue Jan 5, 2024 · 2 comments
Closed

Tableau: CASE WHEN support for WHERE query section #7601

svdimchenko opened this issue Jan 5, 2024 · 2 comments
Assignees
Labels
api:sql Issues related to SQL API enhancement New feature proposal

Comments

@svdimchenko
Copy link

svdimchenko commented Jan 5, 2024

Failed SQL

ERROR: Error during rewrite: Can't detect Cube query and it may be not supported yet. Please check logs for additional information. QUERY: SELECT "backoffice"."channel" AS "channel", MEASURE("backoffice"."active_users_approx") AS "usr:Calculation_227361445783511041:ok" FROM "public"."backoffice" AS "backoffice" WHERE (CASE WHEN (("backoffice"."brand" IN ('P1', 'P2', 'P3')) OR ("backoffice"."brand" IS NULL)) THEN false ELSE true END) GROUP BY 1

the problem is with this where condition which is generated by tableau:

WHERE (CASE WHEN (("backoffice"."brand" IN ('P1', 'P2', 'P3')) OR ("backoffice"."brand" IS NULL)) THEN false ELSE true END)

Version:
0.34.41

Additional context
I run into such issue when I connect tableau to cubejs.
The issue can be reproduced in following way:

  1. Choose any measure from cube
  2. Choose any string dimension and put it as filter. IMPORTANT: to reproduce the issue you should not put the cube's dimension to tableau's group by.
  3. Select more than half of available values in filter. For instane, if you have 30 available values for the dimension, you should select at least 15 to reproduce the problem. When you choose 14 values, all work fine.
  4. Get the error mentioned above in the issue description.
@paveltiunov paveltiunov added api:sql Issues related to SQL API enhancement New feature proposal labels Jan 5, 2024
@paveltiunov paveltiunov self-assigned this Jan 5, 2024
@svdimchenko
Copy link
Author

actually this is the final blocker for https://github.com/gr8-toolkit/cubejs-tableau-connector usage. Once this issue is fixed, we'll test the connector again, sign it and all the community will be able to use it in production

@paveltiunov
Copy link
Member

Fixed in latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:sql Issues related to SQL API enhancement New feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants