Skip to content

Instantly share code, notes, and snippets.

@bmcgavin
Created August 3, 2015 14:13
Show Gist options
  • Save bmcgavin/908445dbab47c929cb19 to your computer and use it in GitHub Desktop.
Save bmcgavin/908445dbab47c929cb19 to your computer and use it in GitHub Desktop.
{
"config": {
"log": "debug"
},
"source" :{
"file": {"path":"/home/vagrant/bugreport_testcase_minimal.json"}
},
"extractor" : {
"json": {}
},
"transformers": [
{ "merge": {"joinFieldName": "articleId", "lookup": "Article.articleId" } },
{"vertex": {"class":"Article"}},
{"edge": {
"class": "Link",
"joinFieldName": "linkedArticles",
"lookup": "Article.articleId",
"direction": "out",
"unresolvedLinkAction": "CREATE"
}},
{"field": {"fieldName": "linkedArticles", "operation":"remove"}},
],
"loader": {
"orientdb": {
"dbURL": "plocal:/data/orientdb_databases/bugreport",
"dbUser":"admin",
"dbPassword":"admin",
"dbAutoDropIfExists": true,
"dbAutoCreate": true,
"standardElementConstraints": false,
"tx": false,
"wal": true,
"batchCommit": 1000,
"dbType": "graph",
"classes": [
{"name":"Article", "extends":"V"}
],
"indexes": [
{"class":"Article", "fields":["articleId:string"],"type":"UNIQUE_HASH_INDEX"}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment