[resolved] How to find max value of a field in mongoDB?

One Star

[resolved] How to find max value of a field in mongoDB?

Hi,
I want to find max value of a field total_marks in mongoDB. How to do it?
MongoDB equivalent of: select max(total_marks) from table;
Can it be done using tMongoDBInput component? 
Four Stars

Re: [resolved] How to find max value of a field in mongoDB?

In order to have max, you need to use groupby clause in your sql query..., you can get the max value for specific column without using talend components...
- in talend you have tAggregatexxx component(s) which can also give you max value based on the aggregate column...
what is the problem you are facing and what is your current design?
vaibhav
One Star

Re: [resolved] How to find max value of a field in mongoDB?

HI vaibhav.
MongoDb is a no-Sql database. So was not able to figure out how to find the max value.
But i figured out that i can sort the input recieved and limit no of records to 1 to get what i needed.
Thanks!

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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