Reputation: 189
I am trying to create a job to insert all my data from Mysql to MongoDB
and this is my configuration :
how to auto generate date_created
and last_updated
?
so every data insert
will auto fill date_created
to new Date()
or current date time and every data updated
will auto update field last_updated
with new Date()
or current date.
Upvotes: 0
Views: 2823
Reputation: 6356
You are looking for the Get System Info
step.
It gives you a number of variables realted to the environement, including the time of the run. I usually use the system date (fixed)
, so that all the date-created are the same for the run, which ease retrieval.
For the last_update
, it is that same technique, if you can setup your Match field for update
in the MongoDB output
step. If you cannot, have a look at the Merge Row (diff)
: it tells you if the record is new, deleted, identical or changed.
Upvotes: 1