I am trying to understand how custom expressions are represented internally in Metabase.
When reviewing the dataset_query field in the application database, I can see MBQL structures, but I am having difficulty understanding how those MBQL expressions correspond to the expressions shown in the Query Builder UI (for example, Custom Column expressions).
Is there any documentation, schema reference, or developer guide that explains:
- The structure and syntax of MBQL expressions
- How MBQL maps to expressions displayed in the UI
- The meaning of the expressions section within dataset_query
- How operators, functions, field references, and aggregations are represented in MBQL
My goal is not to generate MBQL programmatically. I simply want to be able to read MBQL stored in the database and understand the corresponding expression created by users in the Metabase UI.
Any documentation, examples, or source code references would be greatly appreciated.