testdata:
https://support.spatialkey.com/spatialkey-sample-csv-data/test.json file :
{
"config":{
"log": "debug"
},
"begin": [
],
"source" : {
"file": { "path": "./test.csv", "lock" : false }
},
"extractor" : {
"row": {}
},
"transformers" : [
{ "csv": { "separator": ",", "nullValue": "NULL", "skipFrom": 1, "skipTo": 2 } }
],
"loader" : {
"orientdb": {
"dbURL": "remote:localhost/test",
"dbUser": "admin",
"dbPassword": "admin",
"dbAutoCreate": true,
"tx": false,
"dbType": "document",
"classes":[{"name": "test" }],
"indexes": [{"class":"test", "fields":["zip:STRING"], "type":"NOTUNIQUE" }]
}
}
}
Error MSG:
Cannot check the existance of a database in a remote server. Please use the console or the OServerAdmin class.
Why NOT? This tool is useless if remote is not working.
Change to local
{
"config":{
"log": "debug"
},
"begin": [
],
"source" : {
"file": { "path": "./test.csv", "lock" : false }
},
"extractor" : {
"row": {}
},
"transformers" : [
{ "csv": { "separator": ",", "nullValue": "NULL" } }
],
"loader" : {
"orientdb": {
"dbURL": "plocal:/home/master/Downloads/orientdb/orientdb-community-2.1.15/databases/test",
"dbUser": "admin",
"dbPassword": "admin",
"dbAutoCreate": true,
"tx": false,
"dbType": "document",
"classes":[{"name": "test" }],
"indexes": [{"class":"test", "fields":["zip:STRING"], "type":"NOTUNIQUE" }]
}
}
}
Only works if I shutdown the OrientDB server.
Result:
END ETL PROCESSOR
+ extracted 986 rows (0 rows/sec) - 986 rows -> loaded 985 documents (0 documents/sec) Total time: 965ms [0 warnings, 0 errors]
But there is no data in the database, I think because the server is not running.
Question?
How can I load the CSV data via the ETL tool?
Why remote is not working?