当前位置:网站首页>Data_web(九)mongodb增量同步到mongodb
Data_web(九)mongodb增量同步到mongodb
2022-08-03 21:36:00 【ReadMeFrist】
1.mongodb连接、字段等
查看上一篇
2.设置辅助增量要求如下
3.json格式如下
{
"job": {
"setting": {
"speed": {
"channel": 3,
"byte": 1048576
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": [
{
"reader": {
"name": "mongodbreader",
"parameter": {
"address": [
"192.168.1.100:27017"
],
"userName": "username",
"userPassword": "password",
"dbName": "DBname",
"collectionName": "collectionname",
"column": [
{
"name": "sourceSystem",
"type": "String"
},
{
"name": "configId",
"type": "String"
},
{
"name": "target",
"type": "String"
},
{
"name": "userName",
"type": "String"
},
{
"name": "paramJson",
"type": "String"
},
{
"name": "sendTime",
"type": "Date"
},
{
"name": "detailId",
"type": "Long"
}
],
"query": "{
\"sendTime\":{
\"$gte\":ISODate(${lastTime}),\"$lt\":ISODate(${currentTime})},\"detailType\":\"app\",\"sourceSystem\":\"qfcoss\",\"success\": {
\"$eq\": true}}"
}
},
"writer": {
"name": "mongodbwriter",
"parameter": {
"address": [
"192.168.1.101:27017"
],
"userName": "username",
"userPassword": "password",
"dbName": "DBname",
"collectionName": "collectionname",
"column": [
{
"name": "sourceSystem",
"type": "String"
},
{
"name": "app_code",
"type": "String"
},
{
"name": "target",
"type": "String"
},
{
"name": "user_name",
"type": "String"
},
{
"name": "content",
"type": "String"
},
{
"name": "send_time",
"type": "Date"
},
{
"name": "outer_id",
"type": "Long"
}
],
"upsertInfo": {
"isUpsert": false,
"upsertKey": ""
}
}
}
}
]
}
}
query筛选基本和mongodb的find方法类似 sendTime是时间格式筛选 , success是布尔值筛选 ,detailType是字符或者int筛选可以参考
边栏推荐
猜你喜欢
随机推荐
C. Array Elimination-- Codeforces Round #751 (Div. 2)
HCIP第十六天
C. Divan and bitwise operations
LitJson报错记录
FVCOM 3D Numerical Simulation of Hydrodynamics, Water Exchange, Dispersion and Transport of Oil Spills丨FVCOM Model Watershed, Numerical Simulation Method of Marine Water Environment
从0到1看支付
一体化HTAP数据库如此难,为什么他们还要做?
6. XML
深度学习怎么入门?零基础快速入门深度学习
CC2530_ZigBee+华为云IOT:设计一套属于自己的冷链采集系统
距LiveVideoStackCon 2022 上海站开幕还有2天!
Soft exam system analysts note experience sharing: theory of protracted war
《强化学习周刊》第56期:GraphIRL、REDEEMER & 眼科强化学习的潜在研究
tidyverse based on data.table?
【kali-漏洞扫描】(2.1)Nessus解除IP限制、扫描快无结果、插件plugins被删除(中)
LitJson报错记录
B. Paranoid String
编译器工程师眼中的好代码(1):Loop Interchange
XSS testing
XSS练习---一次循环和两次循环问题