Four Stars

Parse Arrays of Json from MongoDB and store in MySQL

Hi, 

I have document stored in MongoDB (Fig 1) , I want to parse the feilds and store them in MySQL (Fig 2) 

Issue 1 ) The feilds extracted are ducplicated (Fig 3 TRow 2). I solved it by taking Unique rows

Issue 2) I am unable to seperate the values in array to 2 rows of data, in order to lookup join later (Fig 3 trow 2 & trow3) for field Stores and Tags (Fig 1) 

Issue 3) How to combine the output of all tExtractJsonFields to input into MySQL 

I appreciate any help in this, as I have been stuck with this for 2 days. 

 

Fig 1Fig 1Fig 2Fig 2Fig 3Fig 3

1 REPLY
Community Manager

Re: Parse Arrays of Json from MongoDB and store in MySQL

Hi

2), You can use a tNormalize component to normalize the data from one row to multiple rows.

3), Cache the output to memory using tHashOutput component. In next subjob, read the data from memory using tHashInput, and do an inner join on tMap.

 

Regards

Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business