I am using Metabase for production use. My database that I use for production is MySQL. I would like to access the Metabase Metadata to get details of all Metabase cards and Dashboard information.
How can I access the metadata to run the below queries.
I was planning to run the below queries -
SELECT rd.id, rd.name as DashboardName, rd.description as DashboardQuestion, q.name as QuestionName, q.description as QuestionDescription, q.display as QuestionDisplay
FROM report_dashboard rd
INNER JOIN report_dashboardcard rdc on rd.id = rdc.dashboard_id
INNER JOIN report_card q on q.id = rdc.card_id
where rd.archived = 0 and q.archived = 0;
SELECT * FROM metabase.report_card where dataset_query like ‘%native%’
Same as for using other MySQL databases.
Create the new database with your MySQL connection information.
Wait a few minutes while it scans.
Ask a question, but select your new database.
Thank you Andrew for your response. We are using MySQL as our production database. And Postgres as Metabase Metadata database for production. In order to query report_card and report_dashboardcard via Question or Native Query do we need to establish a connection between postgres and Metabase and expose postgres through Metabase. Thanks in advance for your help.
I don’t think you do. You can just query the Postgres database directly from Metabase.
Ugh, sorry, just reread my post - looks like I misread your reply.
You need to make a connection between Metabase and Postgres in the same way you did with MySQL.
in Metabase, it’s called ‘adding a database’. Confusing terminology, it should really be ‘connection to database’.