Hi here! I'm planning to analyze query dependencies (mostly which tables are involved in this question) of my workspace's Metabase, so just wondering if it's possible to pull out raw query of all questions at once, plus filling default values set up for input, if there's any (so that I can direct the query into the parser without filling input manually).
Also only few specific DB source will be analyzed, so would be much more helpful for pulling metadata of each question as well to skip DBs not involved in the analysis.
Very new to Metabase, so not pretty sure if there's any API or other ways to access Metabase's questions other than webpage interface.
= =
Update
Already solved but I'll deliberate more about what I'm trying to do.
-
Supposed I'm having a question like this:
SELECT name, category FROM books WHERE {{time_interval}} ;
where
time_interval
filters onupdated_at
column for given date range, with default 'Previous 3 days'.If today's Oct 3, 2021, then the expected output from this question will be:
SELECT name, category FROM books WHERE updated_at >= '2021-10-03' AND updated_at < '2021-10-04' ;
-
Say there are four data sources, I just want to retrieve information above from questions querying one of the sources and skip the rest.