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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

empty/null table show up in ExtractJSON Fields

Hello,

 In fact, I just started working with talend open studio for data integration; I want to export a array long json ;I have a file containing; This showed me that the debianbug field does not always appear0683p000009M4LC.png

How I would like the output to look like:

CVE Scope debainbug description status fixed_version urgency
             

They all appear to be individual CVE sections (and some are), but if you look deeper you will see that some are grouped together.

my job :

0683p000009M4H0.png

tExtractjson1: 

0683p000009M4Bl.png

0683p000009M4Mx.png

textarctjson2:

0683p000009M47t.png

excute:the field is empty/null !!!

0683p000009M48h.png

Does anyone have any advice or ideas on how I can achieve this?

 

I use "Talend open studio for data integration version 7.1.1.2018102681147

 

Thank you very much for your time and help

Best regard

Mitra

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi @mitra1367 ,

 

Here is the job and i just imported an additional jar and you can find it here http://www.java2s.com/Code/Jar/j/Downloadjsonsimple111jar.htm.

 

0683p000009M4Qk.png0683p000009M4Ou.png0683p000009M4Qu.png0683p000009M4M6.png0683p000009M4R9.png0683p000009M4RE.png0683p000009M4QH.png0683p000009M4RJ.png

 

---

Please give Kudos and mark topics as solved where appropriate.

View solution in original post

16 Replies
Anonymous
Not applicable
Author

can you please attache sample file?
Anonymous
Not applicable
Author

thanks

i attache my input json

regards 


inputfille.docx
Anonymous
Not applicable
Author

thanks 

attache my project

regards


test12.zip
Anonymous
Not applicable
Author

Please attach your input file in a plain text file or jsonl file but not in docx. The docs contains only one record and the given json is too large to copy and paste into a notepad++.  Or if possible please add sample records instead of full file.

Anonymous
Not applicable
Author

i attach the file json

thanks 

regards


debainDB.zip
Anonymous
Not applicable
Author

hello

i attach file input json into a notepad++

thanks for your help 

regards


newinput1.txt
Anonymous
Not applicable
Author

Hello,

 

Please add the sample output for one record, so that it will be easy, since the status, urgency and fixed_version keys are present in different objects of releases object. So do you want to consider all the values or from any one of the object. Here is the sample record.

{
"scope":"remote",
"description":"FFmpeg before 0.5.4, as used in MPlayer and other products, allows remote attackers to cause a denial of service (memory corruption and application crash) or possibly execute arbitrary code via a malformed WMV file.",
"releases":
{
"buster":
	{"fixed_version":"7:2.4.1-1","repositories":{"buster":"7:4.1.1-1"},"urgency":"medium**","status":"resolved"},
"stretch":
	{"fixed_version":"7:2.4.1-1","repositories":{"stretch-security":"7:3.2.12-1~deb9u1","stretch":"7:3.2.12-1~deb9u1"},"urgency":"medium**","status":"resolved"},
"sid":
	{"fixed_version":"7:2.4.1-1","repositories":{"sid":"7:4.1.3-1"},"urgency":"medium**","status":"resolved"}
}
}
Anonymous
Not applicable
Author

hello
first of all, thank you for your answer.
next, did you see my json file with all the CVEs?
in fact,  i khnow that the status, urgency and fixed_version keys are present in different objects of releases object but in all objects they have the same values so it's no different I extract status, urgency and fixed_version keys are present from which object.
what is your advice?
thank you to you

Anonymous
Not applicable
Author

Hi @mitra1367,

 

It is depends on your requirement, to consider one object from releases object or all objects from releases object. Anyhow if you consider one object the output will be as follows.

0683p000009M4Qa.png

Note: I just took, limited no of characters of description column to show you the output instead of full value. In the final output i'm getting full description value. 

 

If you consider all objects from releases object, then the output will be as follows

0683p000009M4Qf.png