Executing mbql outside metabase

Hi,
Is it possible to execute a mbql query outside of metabase from a standalone java program/process?
The idea is to use metabase as a repository for easy data exploration and query editing to create some queries for rules.
The actual execution of the queries would be done separately from standalone java process to feed into a rules processing system.

Thanks,
Shanmu.

Hi @shanmuha,

You could like run mbql queries through the Metabase REST API as mentioned here ( https://github.com/metabase/metabase/wiki/Using-the-REST-API#running-custom-queries ), but in terms of building them in a standalone java process I’d take a look at the MBQL Reference with the caveat that it’s a little incomplete and in flux. Metabase itself translates the MBQL into “native” query languages so it may be tough to replicate that in a standalone java process.

Damon