How to get last inserted sequence number from mongoDB

Four Stars

How to get last inserted sequence number from mongoDB

Hi, I'm trying to get last inserted sequence number from mongoDB with tJavaRow. Is it possible to get it? Any other way to get the sequence number?
Tags (1)
Community Manager

Re: How to get last inserted sequence number from mongoDB

Hi
Do you want to retrieve the last inserted object Id? Using tMongoDBInput to query the _id field, Sort by _id column with Desc type and set the Limit parameter as 1.

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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.