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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Extracting from BLOB column

I have one BLOB column and FId column in Table1. In BLOB column, each row contains JSON data in the following format,

{
"Flowers" : {
"Flower1" : "Jasmine",
"Flower2" : "Rose",
"Flower3" : "Lilly"
},
"Fruits" : {
"Fruit1" : "Apple",
"Fruit2" : "Orange",
"Fruit3" : "Strawberry"
},
"Vegetables" : {
"Vegetable1" : "Cucumber",
"Vegetable2" : "Brinjal",
"Vegetable3" : "Potato"
}
}


I want to extract the Fruits section in to each column in Table2..

Eg:- FId    Fruit1     Fruit2      Fruit3
-----------------------------------------------
        1       Apple     Orange     Strawberry


How can I extract only one section of the JSON in to different columns?? Also I want the FId value corresponding to each JSON data in  Table1 to Table2..


Thanks In Advance..

Labels (3)
4 Replies
vapukov
Master II
Master II

what is your database?

Anonymous
Not applicable
Author

Its a MySQL Database..

vapukov
Master II
Master II

simplest ways use 2 components, one from exchange :

tJsonNormalize (author Jan Lolling)

 

second from Talend - tPivotToColumnsDelimited

 

extract JSON from BLOB as Text, like

select convert(json_blob using utf8) as json_blob from

in tDBInput type for column - String

0683p000009M1Az.png

 

you result will be:

0683p000009LzVC.png

 

add to tMap - filter, and exclude JSON_PATH from tMap output, it will be exactly what you want

 

 

apz
Contributor
Contributor

Do you have the screenshot of your tMap settings.