Running user-defined queries in the backend

Hi:)
We are a self-hosted air-gapped application, and we consider Metabase as an analytics platform to expose our predictive engine to the end users.

Part of that is the ability to expose to the end-users (our clients) access to their data in a UI (e.g by Metabase's query builder), and after they generate the query (that may result in millions of rows), to send the question to our backend engine because our data science pipeline will use the resulting results as part of our model training phase.

So the desired pipeline will be something like this

End user in the front end application creates a query
The end-user can investigate the query (e.g. how many resulting rows, what is the average value of a specific column, etc.)
The end-user has a "LAUNCH" button, that sends the data to our backend engine for usage by our data science pipeline.

Can this be done with Metabase? If so, what do you believe is the way to go?

Thanks.

Hi @Dvir
You could have users save questions, then have a launch-button which would take the question ID and lookup the query, which you then send to your backend and handle it there.
If you need to rewrite where data is being sent, then you would need to develop your own build of Metabase and mess around with the query processor - it would not be a simple project, and something you would have to build yourself.

Dear @flamber, once again, thank you for the promp reaponse.
Can you elucidate the term 'rewrite the data being sent'?

Given that they saves a question generated in the query builder, we would like to automatically rerun the exact same query in the backend for further preprocess. If I understand correctly that is already supported? Should that be done using the API?

Thanks.

@Dvir Have the users save the question, then you know exactly which question it is and can get the metadata you need (the query etc) and do something with that.