cube
cube copied to clipboard
Tableau: CASE WHEN support for WHERE query section
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:
- Choose any measure from cube
- 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.
- 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.
- Get the error mentioned above in the issue description.
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