How to X-ray a saved question?

Firstly, I am not sure if this is possible.

We have an ancient database and the logical table which we are interested in is stored as multiple pieces in the database. The logic to generate such table is complicated so I saved the query as a question.

Now I am wondering if it is possible to x-ray the result of this query-based question. I noticed there is a “Tables in saved questions” section but it is empty. The query-based question is working fine in one of the dashboards. What should I do to x-ray (the result of) this question?

Hi @JohannZhu
So you want to be able to have the x-ray feature for this complicated SQL query?
It is possible to run x-ray on the question, but the results are not going to be great, since Metabase has very limited knowledge about the structure.
The best way would be to create a View on your database, so Metabase will just see that as a regular table.

The hack.
Every question has an ID - go to the question and check your URL, which would be /question/X - now change the URL to /auto/dashboard/question/X

It’s a hidden function, and I’m not sure why it isn’t exposed, so I’ll ping @sbelak who knows much more about this.

2 Likes

It’s not exposed for two reasons: in general the UX around x-rays is not yet what we want it to be, so we err on the conservative side in terms of what we expose and 2) currently question x-rays have a very high variance in how useful they are. X-rays on native questions are especially under-loved. I have a revamp of xrays (via domain entities) in the works which should make things much better.

2 Likes

Awsome, thx :slight_smile:

Hi @flamber,
Unfortunately, your tips isn't work. If you have any new development of this feature, let's us know. Thanks

@mluk It still works fine in latest Metabase release, 0.42.1, but it all depends on the question, so the limitations of nested queries still apply, similar to those limitations in other areas.