How to get mongodb sysdate in talend using mongodb connector

Highlighted
Five Stars

How to get mongodb sysdate in talend using mongodb connector

I have talend and mongodb on two different servers and two different zones ( these timezones may change in future). I am trying to set context variable in taled to mongodb sysdate. I have tried few ways using tMongodbInput and tMongodbRow with new Date(), new ISODate() and $currentDate methods. But it is either a JSON parse exception or Bad Command. I am looking for mongodb query for select sysdate from dual. Is there any way to get sysdate like this in taled using mongodb

Six Stars

Re: How to get mongodb sysdate in talend using mongodb connector

Try with Date() or new Date() functions

Five Stars

Re: How to get mongodb sysdate in talend using mongodb connector

Thank you for suggestion. As mentioned in my question description i have tried these two methods, but it is throwing an exception. I appreciate if you can share any screenshot if you have tried/implemented.
Four Stars

Re: How to get mongodb sysdate in talend using mongodb connector

Hi

Can you please let me know TALEND VERSION?

 

is this 6.4.1 or 7.1.1 ?

 

there is some issue in 6.4.1 and 7.0.1 mongodb connector .

 

 

Thanks

Chandru

Five Stars

Re: How to get mongodb sysdate in talend using mongodb connector

I am using talend 7.1.1 with mongo db 3.2.x

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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog