MongoDB to Excel

Five Stars

MongoDB to Excel

I am pulling data from MongoDB using tMongoDBInput and displaying using tLogRow component and it's working fine. But When I try to import the data out tMongoDBInput the output excel is not opening. I am getting error "Excel can't open because file  format or the extension is not valid." Please let me know what could be the issue.


Accepted Solutions
Five Stars

Re: MongoDB to Excel

Thanks Nikhil.

Actually I did try all of this and neither excel or csv was working. However I did found the soulution. I used following to fix and hereafter I can open the excel with imported Mongodb data. Thanks for your help. Not sure if this issue is because of Excel or what.

 

Fix 1. Change the Excel File Extension
Step 1. Open Microsoft Excel and go the File tab.

Step 2. Click Export and choose Change File Type

Step 3. Change the file extension to .xlsx. Check if Excel can open your file or not.

 


All Replies
Employee

Re: MongoDB to Excel

Hi,

 

   Could you please share the job screen shots and the schema screenshots you are using to extract data from MongoDB? 

 

Warm Regards,

 

Nikhil Thampi

Five Stars

Re: MongoDB to Excel

Hi Nikhil,

 

Attached are the shots for job desing and tFileOutputExcel properties.

 

Thanks

Chandra

Employee

Re: MongoDB to Excel

Hi,

 

    I am actually interested in the column list in the schema which you have created in tMongoDBInput.

 

Warm Regards,

 

Nikhil Thampi

Five Stars

Re: MongoDB to Excel

Sorry forgot to attache schema. here it is.

Five Stars

Re: MongoDB to Excel

I have just one column called name.

Employee

Re: MongoDB to Excel

Hi,

 

    Could you please show the values in inside schema as shown in screenshot?

image.png

 

 

I assume it has been currently configured as Object type. Could you please check it?

 

Warm Regards,

 

Nikhil Thampi

Five Stars

Re: MongoDB to Excel

Nikhl,

 

Attahed is shcema with colum. Please let me know if you need anything else.

 

 

 

Five Stars

Re: MongoDB to Excel

It's configured as String.

Five Stars

Re: MongoDB to Excel

Hi Nikhil,

 

Did you find anything that will fix the issue? Please let me know if you need anything else from me.

Thanks

Chandra

 

Employee

Re: MongoDB to Excel

Hi,

 

    It seems you have not correctly mentioned the node path in your schema. In your schema, the parent node path is empty. I could not see the collection since it is not added in your screenshot. But I guess it is also empty in your component.

image.png

Ideally, you need to mention the collection and path in the tMongoDBInput component. Please refer the screenshots for sample flows in help document.

 

image.pngsample collection

 

image.pngtMongoDBInput

 

 

Could you please refer the sample scenario from the below link and create your flow accordingly?

 

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/AVyV~wHR8ddC1EF5nhvVoQ

 

If the reply has helped you, could you please mark the topic as resolved? Kudos are also welcome :-)

 

Warm Regards,

 

Nikhil Thampi

 

 

Five Stars

Re: MongoDB to Excel

Thanks for your reply. Actually I am having just one column in my collection and there is no parent node. Please see attached shots for collenction details and component details. I am also mentioned collection name in component as well. Actually I can print the values use tLogRow but the issue is when I import the data in excel job gets complete but excel is not opening saying "file format or extension is not valid verify that the file is not corrupted.."

Employee

Re: MongoDB to Excel

Ok. I just want to rule out that possibility.

 

Just to do verification, could you please try to load in a csv file instead of excel? Or try to stream the output of current tLogrow to the excel file in xlsx format.

 

Warm Regards,
Nikhil Thampi

Note:- Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

 

Five Stars

Re: MongoDB to Excel

Thanks Nikhil.

Actually I did try all of this and neither excel or csv was working. However I did found the soulution. I used following to fix and hereafter I can open the excel with imported Mongodb data. Thanks for your help. Not sure if this issue is because of Excel or what.

 

Fix 1. Change the Excel File Extension
Step 1. Open Microsoft Excel and go the File tab.

Step 2. Click Export and choose Change File Type

Step 3. Change the file extension to .xlsx. Check if Excel can open your file or not.

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now