That's a normal behaviour. What happens if you put into into " ... "?

This is a CSV issue, not a OrientDB, I believe.

Am Mittwoch, 10. Dezember 2014 16:10:28 UTC+1 schrieb Andrei Serea:
>
> Hello!
>
> I've been trying to do a simple ETL import from a csv file to a brand new 
> graph database using Orientdb 2.0-M3 without any luck.
> The problem is that when i'm running the oetl.bat (which I downloaded from 
> https://github.com/orientechnologies/orientdb-etl/tree/2.0-M3/script), 
> OrientDB invariably interprets strings starting with digitsas numbers and 
> outputs a java.lang.NumberFormatException. Or at least this is what I 
> deducted since for some entries in the csv (those with fields not starting 
> with digits) it does not output errors.
>
> Here is the simple ETL file:
>
> {
>   "source": { "file": { "path": "test.csv" } },
>   "extractor": { "row": {} },
>   "transformers": [
>     { "csv": {} },
>     { "vertex": { "class": "Organization" } }
>   ],
>   "loader": {
>     "orientdb": {
>        "dbURL": 
> "plocal:c:\\programming\\orientdb-community-2.0-M3\\bin\\testdb",
>        "dbType": "graph",
>        "dbUser": "root",
>       "dbPassword": "root",
>        "classes": [
>          {"name": "Organization", "extends": "V"},
>          {"name": "User", "extends": "V"},
>          {"name": "SUB_CHILD", "extends": "E"},
>          {"name": "BELONGS_TO", "extends": "E"}
>        ], "indexes": [
>          {"class":"Organization", "fields":["Tpid:string"], 
> "type":"UNIQUE" }
>        ]
>     }
>   }
> }
>
> And here is the test.csv file:
> Name,ShortName,Tpid
> Name1,SUE_SSFG,FD71D202-7942-1000-878F-C0A8B4340001
> Name2,SUE_SSFG2,7D71D202-7942-1000-878F-C0A8B4340001
>
> The output is the following:
> OrientDB etl v.2.0-M3 (build @BUILD@) www.orientechnologies.com
> BEGIN ETL PROCESSOR
> [2:csv] ERROR Error on setting document field Tpid=null 
> (cause=java.lang.Number
> ormatException: For input string: "7D71D202-7942-1000-878F-C0A8B4340001")
> END ETL PROCESSOR
> + extracted 3 rows (0 rows/sec) - 3 rows -> loaded 2 vertices (0 
> vertices/sec)
> otal time: 180ms [0 warnings, 1 errors]
>
> It only output an error for the property starting with a digit...
>
> I've tried both with the orientdb-etl-2.0-M3 that came with the M3 archive 
> downloaded from the site and with the self-compiled version from github 
> (wierdly, these 2 differ in content).
>
> Any clues?
>

-- 

--- 
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