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: 
TJ1598223511
Contributor
Contributor

JSON Attributes Insert Or Update

I am writing data from RDBMS to Target DB, there is a column in Target which holds JSON attributes/objects, for the first time i am able to insert the data in below format, but how can how can i perform delta processing. For example if i want to update the Value of CUSTOMER_NAME, how this can be achieved using Talend ? I know there are JSON components but using tExtractJSONField, unable to extract this the correct data because of Name & Value. Is there any solution for this kind of delta processing ???

{

"attributeValue"

: [

{

"Name"

:

"CUSTOMER_ID"

,

"Value"

:

"12345"

},

{

"Name"

:

"CUSTOMER_NAME"

,

"Value"

:

"JACK"

}

]

}

Help is greatly appreciated....

Labels (3)
3 Replies
TJ1598223511
Contributor
Contributor
Author

Can someone from Talend Professionals provide some solutioning....

Anonymous
Not applicable

Hello,

Here is a tWriteJSONField which can be used to generate an array format json output.

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

TJ1598223511
Contributor
Contributor
Author

@Xiaodi Shi​, My question is i have the data in the above mentioned format in one of my Target fields, lets say my Target field is attribute_json which is holding the above mentioned JSON format. For this attribute_json field I have to perform UPDATE on existing json data, i cannot replace json data in attribute_json since this field is holding other teams data too, so only option i need to update the data. For suppose if i get an update on this JSON value alone {"Name":"CUSTOMER_NAME", "Value":"JACK"} like i need to update from JACK to RACK in Target how can we achieve this through Talend.

 

First thing i am unable to read the Name and Value data using tExtractJSONField component.

 For me i feel like Talend can only do insert or update on relational data fields but not on JSON data fields, for json data I have I see only to use java code.

 

Hope this helps.

 

Thanks,

Thiru.