One Star

Json Files map to the mongo DB

hi
I have big size json files and i have to put in to the mongoDB. I am using tFileInputJson component to fetch the data from json file but the problem is that json files is having so much fields and while defining the schema i have to take care of each field,even while mapping i have to write Json Path query for each field. it's become very complicated,
Is there any component by which i will automatically get the fields from json files. so that i can directly put in to the mongoDB

Thanks In advance

15 REPLIES
Moderator

Re: Json Files map to the mongo DB

Hi,
You want to guess the schema of your big json file, right? Here is a good new for community user. This feature is in available in Talend Open Studio Version 5.3. The latest version will be released in recent(Pay more attention on forum announcement).
see my pic
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: Json Files map to the mongo DB

Hi ashish.s,
A good news, Talend Open Studio 5.3.0 products have been released. Please get them from products and the feature "File json" in metadata is avaiable in Talend Open Studio 5.3.0 products(see my pic).
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: Json Files map to the mongo DB

Hi,
You are welcome. thanks for your feedback.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi xdshi,
Thanks for the reply and understanding my post but can it is possible through Talend V 5.2.2 if not then in 5.3.0 can you give me the screenshot with simple steps how to do it.
Moderator

Re: Json Files map to the mongo DB

Hi,
"File json" feature is only available in 5.3.0.
Please see the related reference to know how to set the json file schema JSON+file+schema.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi Sabrina,

Thanks for reply, now I am able to get the schema through File json component in V 5.3.0 but for a few the files while uploading I am getting errors like "{0} is not found or json file formate is incorrect", i checked my files in the json validater it is telling valid.
Do you have any idea about it ,why i am getting this errors or how i can resolve this problem.

Regards
Ashish
Moderator

Re: Json Files map to the mongo DB

Hi,
From the error message, it means that your json file format is not correct. If a few of files are valid and others are invalid, I think the validation function of "File Json" is working. Could you please paste your error json file into forum, perhaps we can address this issue.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi Sabrina,
I also have facing the same issue when I tried talend 5.3 this feature. Even for the VALID Json, it emits the validation error stating the format is incorrect.
I infact the enterprise user for Talend 5.2.1 and hoping this feature is really useful going forward. I can attach the json file which I tried to upload in "File Json" metadata creator to define the json schema through talend 5.3.
Please let me know how to attach the file as I don't see the option here to attach the file
-Rajeshram
Moderator

Re: Json Files map to the mongo DB

Hi,
There is no option for "Attachment ", you can paste the json file content into forum so that I can consult it to our component developer.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi this is one sample for which i am getting error "{0} is not found or incorrect json file format " while uploading the file

and when i am changing the "25d71748a9270c392b5d34fdf5b99e18" to "T25d71748a9270c392b5d34fdf5b99e18" then its work fine.
any solution or suggestion ?
Moderator

Re: Json Files map to the mongo DB

Hi,
shong has replied your related forum Forum 29652, please review it.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi Sabrina
Thanks for the reply , as per shong suggestion I will report this in bugtracker.

Thanks
Ashish.s
Moderator

Re: Json Files map to the mongo DB

Hi,
Thanks for your contribution. It will be very appreciated if you can post the jira issue link on forum. So that our community users can review and add a comment on the issue.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Json Files map to the mongo DB

Hi
Here is the jira issue link https://jira.talendforge.org/browse/TDI-26077

Thanks
Ashish.s
Moderator

Re: Json Files map to the mongo DB

Hi ashish.s,
Thanks for the feedback. I will track this issue and inform you on forum when there is a solution.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.