You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am pretty new to the cube,.js , we are doing a POC for with cubejs for our analytics page
we have a usecase where we need to transform data based on category , the categories size can be very big can range upto 1000 records which we are thinking to store in a javascript map.
To get you the scenario I have tried to simulate a scenario with genders .
Tried with chatGPT it showed to use case but coming to the practicality with 1000 + categories the performance will be degraded . So can you guys please suggest probably the computationally less expensive way .
Tried like this getting sex as value instead of the db value
Either apply the transformation on the consumption side (i.e., after you receive the data from the API). There you can map the data in any way you want, and JavaScript should be performant enough for that.
Or apply the transformation on the database side. In this case, you can have a separate table for your mappings, and maybe a separate Cube that is joined to the existing one. Then, you can rely on the database to perform the join and send you already transformed data.
Thanks for the quick reply
How will be the performance in case of another cube , base collection records can range to 10-20M and the static cube can have 1000 records.
can you point the implementation so i can refer :)
Problem
I am pretty new to the cube,.js , we are doing a POC for with cubejs for our analytics page
we have a usecase where we need to transform data based on category , the categories size can be very big can range upto 1000 records which we are thinking to store in a javascript map.
To get you the scenario I have tried to simulate a scenario with genders .
Tried with chatGPT it showed to use case but coming to the practicality with 1000 + categories the performance will be degraded . So can you guys please suggest probably the computationally less expensive way .
Tried like this getting sex as value instead of the db value
Related Cube.js schema
Related Cube.js generated SQL
Also tried using like this
'${generateCaseStatement2(
${CUBE}.sex)}'
getting the same issueThe text was updated successfully, but these errors were encountered: