Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Gourav_King_of_DataLand
Contributor II
Contributor II

Extract ColumnName and Value from JSON

Hello,

 

I have a requirement which I am not able to figure the solution for it myself.

Requirement : There is a product table which has following columns

Prod_ID - contains product ID

Prod_Name - Contains product name

Prod_config - Contains additional information about the product features in JSON format (as a sting)

Each product can have one or many features, the information of which is present in Prod_Config in key:value pair in JSON structure. I want to transform this JSON text into table format 

 

so the the value of Prod_config 

0683p000009M0vC.png

 

should be transformed and put in separate table like this 

0683p000009M11D.png

 

I linked my database input to tExtractJSONFields

 

0683p000009M0XU.png

 

From here I can manually configure individual attributes and write appropriate JSON query to extract information from them. But the problem is, the table data is from external source which I have no control on + are you might have noticed in the example one product can have 1 attribute another can have 50 and another can have 100+. I need a dynamic know all the attributes present and transform them into the require table format without manually configuring (something that I have no control of and can change very frequently). There can be new attributes added to products so I should not have to come back and update my JOB each time that happens. Hope I have explained my problem and restriction for solution.

 

Any help would be highly appreciated. Thank You in Advance.

 

 

 

Labels (4)
1 Reply
vapukov
Master II
Master II

Hi

as a variant - use search function 🙂

https://community.talend.com/t5/Design-and-Development/Unable-to-parse-JSON-quot-name-quot-using-tEx...
(it more than 1 of course)