-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Generating cube () from configuration data of database #141
Comments
@610278470 Heya! Could you please provide some more info on the problem you're trying to solve? Any example charts you want to build and data structure you have will be very helpful. Here's some info on Funnel support: https://cube.dev/docs/funnels |
@paveltiunov Now funnel is configured in the back end and queried through the front end. The query format of funnel is fixed. Now I want to realize that the front end can generate funnel queries at will. For example, the front end selects several events that need to be filtered, and then dynamically generates funnels to query data through the back end. |
Is this requirement achievable? I don't see any relevant information in the documents and examples. Thank you. |
@610278470 Ah. Gotcha! Yep. Right now what you can do is generate Funnel definitions on the fly if you persist those in some way. Here's an example: https://github.com/statsbotco/cube.js/blob/master/examples/event-analytics/backend/schema/Funnels.js. You can use regular javascript to access database or API to get these descriptions. We still need to remove restrictions on |
@610278470 Just released it in 0.10.0. So here's an example of how you can use it in case you have some API for retrieving funnel definitions:
cc @keydunov |
@610278470 Could you please try and let me know if it works for you? |
Error: Compile errors: @paveltiunov I also introduced the node module in Funnel.js before, and reported this error. This is perfect if the funnel query can be generated based on the query conditions of the front end. |
@610278470 Did you upgrade to 0.10.0? |
@paveltiunov Well, embarrassment. Forget the updated version.Thanks. |
@610278470 Does it work? |
@paveltiunov Yes, it's great. |
@610278470 on which database did you try out? Can you elaborate the procedure |
@PVinay737 Mongodb. There is sample code in the above answer, the actual is to write the title and step parameters required by the custom funnel in the database, and then request the server to get the defined parameters to generate a funnel query. |
how do i get data from this dynamic async module? in the dashboard its not listed |
Funnel query I want to write the parameters needed for query in the database, and then generate cube () based on these parameters.Thanks.
The text was updated successfully, but these errors were encountered: