Yvan,

      You solved my two problems!

      I tested your example when the server is running and the result was
no problems!


      Thanks!

  Luc.


On Mon, Apr 18, 2016 at 5:17 PM, Ivan Mainetti <[email protected]>
wrote:

> Hi,
>
> try this json:
>
> {
>   "source": { "file": { "path":
> "/home/ivan/Scrivania/etl/comm18-04/data.csv" } },
>   "extractor": { "csv": {} },
>   "loader": {
>     "orientdb": {
>        "dbURL":
> "plocal:/home/ivan/OrientDB/db_installati/enterprise/orientdb-enterprise-2.1.15/databases/comm1804",
>        "dbType": "document",
>        "class": "test",
>        "classes": [{"name": "test"}],
>        "indexes": [{"class":"test", "fields":["zip:STRING"],
> "type":"NOTUNIQUE" }]
>     }
>   }
> }
>
>
> I've added the "class" parameter in the loader, like explained here
> <http://orientdb.com/docs/last/Loader.html> and it's working for me.
>
>
> Hope it helps, bye
>
>
> Il giorno lunedì 18 aprile 2016 16:16:08 UTC+2, Luc Evers ha scritto:
>>
>> 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?
>>
>>
>>
>>
>>
>> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "OrientDB" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/orient-database/JHjCL7grdRk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to