mysqlmetabasejson-extract

Metabase - create filter from json field


Is there a way to add a filter based on extracted data from a json field? currently I can do something like

json_extract(meta, '$.mp_origin_meta') AS booking_type)

or

meta->'$.mp_origin_meta'

to extract specific data by writing a native query, but I really want to add this like a filter to my dashboard.


Solution

  • I solve this problem using our analytics script which sends our data to Metabase. Generally, we have to create a virtual field in our table and add the json extracted value to that new field. I did this programmatically with a PHP script, but there must be a way to add a field via Metabase panel.