kettle+mongodb data sync to MySQL
1. Preface:
The date type in MongoDB is stored in UTC (coordinated Universal time), and the isodate type is equal to GMT (GMT). And Beijing is in the area of +8, so MONGO Shell will gmt+0800 the current time minus 8, stored in GMT time.
2. Overview of Extraction Operations
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/C8/wKiom1gcMc_CAetyAAAa3XTzyqU778.png-wh_500x0-wm_3 -wmp_4-s_2776987160.png "title=" 52[ppz6xlo%zqsg~m ' M~}me.png "alt=" Wkiom1gcmc_caetyaaaa3xtzyqu778.png-wh_50 "/>
3. Component Selection:
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/89/C8/wKiom1gcMmCSvfeCAAB2KBt8RfU414.png-wh_500x0-wm_3 -wmp_4-s_3340592222.png "title=" 2hvpyt5a]rm[tzs3pqmj}9e.png "width=" [height=] "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:400px;height:300px; "alt=" Wkiom1gcmmcsvfecaab2kbt8rfu414.png-wh_50 "/>
4. Incremental Processing:
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/C6/wKioL1gcMhjAiRZ-AABJJuEeWGY991.png-wh_500x0-wm_3 -wmp_4-s_1042098246.png "title=" P[ui@x6pf0]gwd]vopsb@i8.png "alt=" Wkiol1gcmhjairz-aabjjueewgy991.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/89/C7/wKioL1gcP4uzlQs-AAAoztvowqs375.png-wh_500x0-wm_3 -wmp_4-s_4254173693.png "title="%he@w9sg@f)]t]}1 (kcd3af.png "alt=" Wkiol1gcp4uzlqs-aaaoztvowqs375.png-wh_50 "/>
The query in MongoDB is correct as follows:
> Db.xamessages.find ({created_at:{$gte: isodate ("2016-08-16 18:33:36")},yy_id:48}). Sort ({created_at:1}). Limit ( 1)
However, the query in Kettle MongoDB will be an error.
Workaround:
{"$query": {"Created_at": {"$gte": {"$date": "2016-11-03T00:00:00Z"}}}}
Kettle Wikipedia: Http://wiki.pentaho.com/display/BAD/Create+a+Parameterized+Report+with+MongoDB
This article is from the "cloud track" blog, so be sure to keep this source http://chenhuican.blog.51cto.com/6965507/1869505
Kettle+mongodb data sync to MySQL