Hi,
I've just tried to load sample data from CSV through ETL as it appears in 
example (http://orientdb.com/docs/last/Import-from-CSV-to-a-Graph.html)
but unfortunately i got error.
Here are CSV's 
1. *post.csv*
id,title
10,NoSQL movement
20,New OrientDB

2.* comments.csv*
id,postId,text
0,10,First
1,10,Second
21,10,Another
41,20,First again
82,20,Second Again

JSON files
1. *post.json*
{
  "source": { "file": { "path": "/tmp/post.csv" } },
  "extractor": { "row": {} },
  "transformers": [
    { "csv": {} },
    { "vertex": { "class": "Post" } }
  ],
  "loader": {
    "orientdb": {
       "dbURL": "remote:localhost/Blog",
       "dbType": "graph",
       "classes": [
         {"name": "Post", "extends": "V"},
         {"name": "Comment", "extends": "V"},
         {"name": "HasComments", "extends": "E"}
       ], "indexes": [
         {"class":"Post", "fields":["id:integer"], "type":"UNIQUE" }
       ]
    }
  }
}


2. *comments.json*

{
  "source": { "file": { "path": "/tmp/comments.csv" } },
  "extractor": { "row": {} },
  "transformers": [
    { "csv": {} },
    { "vertex": { "class": "Comment" } },
    { "edge": { "class": "HasComments",
                "joinFieldName": "postId",
                "lookup": "Post.id",
                "direction": "in"
            }
        }
  ],
  "loader": {
    "orientdb": {
       "dbURL": "remote:localhost/Blog",
       "dbType": "graph",
       "classes": [
         {"name": "Post", "extends": "V"},
         {"name": "Comment", "extends": "V"},
         {"name": "HasComments", "extends": "E"}
       ], "indexes": [
         {"class":"Post", "fields":["id:integer"], "type":"UNIQUE" }
       ]
    }
  }
}


*Here is ETL log :*

root@proteus:~/orientdb-enterprise-2.1.0/bin# ./oetl.sh /tmp/post.json
OrientDB etl v.2.1.0 (build @BUILD@) www.orientdb.com
BEGIN ETL PROCESSOR
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 1000ms [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 2s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 3s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 4s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 5s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 6s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 7s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 8s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 9s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 10s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 11s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 12s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 13s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 14s [0 warnings, 0 errors]
+ extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0 
vertices/sec) Total time: 15s [0 warnings, 0 errors]
END ETL PROCESSOR
+ extracted 3 rows (8 rows/sec) - 3 rows -> loaded 2 vertices (5 
vertices/sec) Total time: 15370ms [0 warnings, 0 errors]
root@proteus:~/orientdb-enterprise-2.1.0/bin# ./oetl.sh /tmp/comments.json
OrientDB etl v.2.1.0 (build @BUILD@) www.orientdb.com
BEGIN ETL PROCESSOR
Error in Pipeline execution: java.lang.NullPointerException
java.lang.NullPointerException
        at 
com.orientechnologies.orient.etl.transformer.OEdgeTransformer.createEdge(OEdgeTransformer.java:186)
        at 
com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:117)
        at 
com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
        at 
com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:114)
        at 
com.orientechnologies.orient.etl.OETLProcessor.executeSequentially(OETLProcessor.java:487)
        at 
com.orientechnologies.orient.etl.OETLProcessor.execute(OETLProcessor.java:291)
        at 
com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:161)
ETL process halted: 
com.orientechnologies.orient.etl.OETLProcessHaltedException: 
java.lang.NullPointerException
root@proteus:~/orientdb-enterprise-2.1.0/bin#

Its looks like the EDGE's has not been created.
Do i need to add some MERGE transformer to overcome this problem? 
Is there some error in documentation ?

Thanks,





-- 

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