cube-js / cube

📊 Cube — Universal semantic layer platform for AI, BI, spreadsheets, and embedded analytics
https://cube.dev
Other
18.01k stars 1.78k forks source link

Post processing results on server side #1286

Closed rawpixel-vincent closed 4 years ago

rawpixel-vincent commented 4 years ago

Is your feature request related to a problem? Please describe. Being able to optionally transform a set of results on the server side (after caching or before caching, to discuss).

Describe the solution you'd like Given a specific cube.js server request, I should be able to hook into the set of results and transform it.

Describe alternatives you've considered

Additional context In our use case, transforming the set of results directly within the cube.js server would be the more efficient way to do it.

paveltiunov commented 4 years ago

@rawpixel-vincent Hey Vincent! Thanks for posting this! Let's use this issue to collect use cases to address this issue in the best possible way. Would love to hear yours and other people use cases!

rawpixel-vincent commented 4 years ago

We use cube.js to render a bunch of table that shows a top hundreds entities for whatever metrics, so we'd like to call other services running on the same network server side to enrich those table (using the cube.js tasks) But I think I found a way to do that and will post here once I tried

paveltiunov commented 4 years ago

@rawpixel-vincent That makes sense. Would love to hear about the approach you try! So is a challenge basically to run your service for records in Cube.js result set?

rawpixel-vincent commented 4 years ago

cool, I saw you are planning to migrate the express server integration to a micro service architecture. So what I suggest would not work. Anyway, what I want to do would solve that issue, I want to call the cube.js service from another service on the same network. So is there a way to call the cube.js service from the server side, not using cube.js client api?

Calling my service from the frontend on the result set is one solution, but less efficient in our case

rawpixel-vincent commented 4 years ago

no problem.., I can use the cube.js client https://cube.dev/docs/@cubejs-client-core and implement what i want on my service..