On a Table view, when I create a Custom Column via the Editor, and then I click on the Preview symbol, it displays the result as expected.
But as soon as I add a Filter just below, and click on Preview or Visualize, the column is empty.
SELECT `source`.`creation_date` AS `creation_date`, `source`.`job_name` AS `job_name`, `source`.`state` AS `state`, `source`.`job_id` AS `job_id`, `source`.`filtered_kwargs` AS `filtered_kwargs`, `source`.`Alert ID` AS `Alert ID`
FROM (SELECT `operate_network_script_job`.`args` AS `args`, `operate_network_script_job`.`creation_date` AS `creation_date`, `operate_network_script_job`.`job_name` AS `job_name`, `operate_network_script_job`.`state` AS `state`, `operate_network_script_job`.`job_id` AS `job_id`, `operate_network_script_job`.`filtered_kwargs` AS `filtered_kwargs`, substring(regexp_substr(`operate_network_script_job`.`args`, 'alertId'': ''([0-9a-f]+-){5}[0-9a-f]+'), 12, 50) AS `Alert ID` FROM `operate_network_script_job`) `source`
WHERE (`source`.`job_name` <> 'opsgenie.task_launcher'
OR `source`.`job_name` IS NULL)
LIMIT 1048575
@Noosymer I'm guessing that you don't have any data in your args column that will match the output.
You can run the query directly on your MySQL server as a test.
I've tested directly on my MySQL DB and it doesn't work either.
As soon as I specify the WHERE statement, the Alert ID column is empty and I don't understand why.
@Noosymer If it doesn't work on MySQL either, then how is Metabase supposed to show something different? The results are being sent from MySQL to Metabase.
Metabase cannot do something that the database does not support or do.
It might be a bug in your MySQL version, so check for updates, but it's difficult to say, since I cannot reproduce, so it might just be your data or the query.
@flamber yes I know that if it doesn't work on my MySQL DB directly, it can't work in Metabase, that's not what I wanted to say.
Just answering about the situation, if you had an idea about the query...
Thanks for your help !