Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Mysql select - get data by json_extract

Hello,

how do I get the result from a json object with json_extract in a mysql select?

My example code:

{"price":"19.99"}

 

select
 a.id,
 a.name,
 JSON_EXTRACT(aa.details, '\"$.price\"') AS JsonAttr,
from article as a
left join article_attributes AS aa ON a.id = aa.articleId

best regards

 

 

Labels (2)
2 Replies
manodwhb
Champion II
Champion II

@torbre , do you want to extract the json fields from mysql table? then use tExtractJson after the tDBInput component.

Anonymous
Not applicable
Author

Hello,

 

@manodwhb,

Yes, I want to extract the JSON from the db cloumn. Actually, I wanted to avoid another component, since you can extract the data in select using JSON_EXTRACT. My question would still be, why is it not possible to extract the data like this via a select in tMysqlInput?

 

My Solution: I now extract the data using Java code.

 

Thank you for your prompt reply

Best regards