JSON_TABLE now supported

Hi,
I am trying to use the json_table function but I am getting error:

SELECT * FROM JSON_TABLE(’[ {“c1”: null} ]’,’$[*]’ COLUMNS( c1 INT PATH ‘$.c1’ ERROR ON ERROR )) as jt;

with error from Metabase:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(’[ {“c1”: null} ]’,’$[*]’ COLUMNS( c1 INT PATH ‘$.c1’ ERROR ON ERROR )) as jt; ’ at line 18

Does it mean the json_table is not supported?
Thanks

Hi @ivobrabec
Please post “Diagnostic Info” from Admin > Troubleshooting, and which version of MySQL you’re querying.
The query is sent to your MySQL server, so check if the server has the function - or try with another tool like DBeaver.io

{
“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.10+9”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9”,
“os.name”: “Linux”,
“os.version”: “4.15.0-134-generic”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“application-database-details”: {
“database”: {
“name”: “MySQL”,
“version”: “5.7.33”
},
“jdbc-driver”: {
“name”: “MariaDB Connector/J”,
“version”: “2.6.2”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-01-26”,
“tag”: “v0.37.8”,
“branch”: “release-x.37.x”,
“hash”: “490cea7”
},
“settings”: {
“report-timezone”: “Europe/Brussels”
}
}
}

@ivobrabec If you’re using MySQL 5.7.33, then that’s why - only available since MySQL 8.0.4:
https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html

i see thanks.