Created
December 28, 2018 08:44
-
-
Save staticor/5741c0628d2adf54feb018afeffe87ed to your computer and use it in GitHub Desktop.
datax example mongo writer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"job": { | |
"setting": { | |
"speed": { | |
"channel": 2 | |
} | |
}, | |
"content": [ | |
{ | |
"reader": { | |
"name": "odpsreader", | |
"parameter": { | |
"accessId": "********", | |
"accessKey": "*********", | |
"project": "tb_ai_recommendation", | |
"table": "jianying_tag_datax_test", | |
"column": [ | |
"unique_id", | |
"sid", | |
"user_id", | |
"auction_id", | |
"content_type", | |
"pool_type", | |
"frontcat_id", | |
"categoryid", | |
"gmt_create", | |
"taglist", | |
"property", | |
"scorea", | |
"scoreb" | |
], | |
"splitMode": "record", | |
"odpsServer": "http://xxx/api" | |
} | |
}, | |
"writer": { | |
"name": "mongodbwriter", | |
"parameter": { | |
"address": [ | |
"127.0.0.1:27017" | |
], | |
"userName": "", | |
"userPassword": "", | |
"dbName": "tag_per_data", | |
"collectionName": "tag_data", | |
"column": [ | |
{ | |
"name": "unique_id", | |
"type": "string" | |
}, | |
{ | |
"name": "sid", | |
"type": "string" | |
}, | |
{ | |
"name": "user_id", | |
"type": "string" | |
}, | |
{ | |
"name": "auction_id", | |
"type": "string" | |
}, | |
{ | |
"name": "content_type", | |
"type": "string" | |
}, | |
{ | |
"name": "pool_type", | |
"type": "string" | |
}, | |
{ | |
"name": "frontcat_id", | |
"type": "Array", | |
"splitter": " " | |
}, | |
{ | |
"name": "categoryid", | |
"type": "Array", | |
"splitter": " " | |
}, | |
{ | |
"name": "gmt_create", | |
"type": "string" | |
}, | |
{ | |
"name": "taglist", | |
"type": "Array", | |
"splitter": " " | |
}, | |
{ | |
"name": "property", | |
"type": "string" | |
}, | |
{ | |
"name": "scorea", | |
"type": "int" | |
}, | |
{ | |
"name": "scoreb", | |
"type": "int" | |
}, | |
{ | |
"name": "scorec", | |
"type": "int" | |
} | |
], | |
"upsertInfo": { | |
"isUpsert": "true", | |
"upsertKey": "unique_id" | |
} | |
} | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment