One Star

Create JSON structure from CSV file.

Hi,
I want to generate following JSON format from a CSV input file on each row basis.
{
"data": {
"type": "type1",
"details": ,

]
},
"type": "type2",
"ess": {
"type": "address",
"details": {
"ID": "123456"
}
},
"details": {
"title": "testtile",
"time": ,
}
}
Kindly suggest if someone has created same type of structure in JSON.
Thanks
3 REPLIES
One Star

Re: Create JSON structure from CSV file.

Hi
You can use tWriteJSONField component to generate JSON file.
Because you didn't offer input data, we can't create it for you.
Regards,
Pedro
One Star

Re: Create JSON structure from CSV file.

Please find below the input format..
ItemID,type1,length,width,hieght,depth,vendortype,vendoraddress,vendortype,time
Where:
ItemID : JSON file has been created on the basis this id.
type1: type1 in data section.
length,width,hieght,depth : these all go in details section of "data"
vendortype=type2
vendoraddress = address
vendortype = title
time = time.
I tried using tWriteJSONField but was not able to use it as per expectation.
Thanks

Re: Create JSON structure from CSV file.

Hi
I am new in Talend. We are going to use Talend as our ETL process. At present, we are exploring Talend Big Data Open studio 5.* version based on our requirement. Please help me to solve this issues which I am faceing when trying with Talend.
Input file is in below format :
MemId,Age,FirstName,LastName,Date
1,25,Prakash,Dutta,1/1/2014
107,16,Joshua,Lin,1/1/2014
116,15,Windy,Xin,1/5/2014
125,14,Orange,Smith,2/5/2014
From this file, we need to JSON file as below format and insert the json document in mongodb. The JSON format would be as below

Please help me to get a way to solve this issue.
Regards,
Prakash