Hi Marek,

try using these jsonS:

nodes.json
{ 
  "config" : {  
      "haltOnError": true, 
      "log": "info", 
      "parallel": false 
  }, 
  "source": { "file": { "path": "nodes.csv", "lock": false} }, 
  "extractor": { "row": {} }, 
  "transformers": [ 
    { "csv": {"separator": ";",  
        "columnsOnFirstLine": true, 
        "columns":  
          ["ID","LABEL","PROPERTY1"] 
        }  
    }, 
    { "vertex": { "class": "Node" } }          
  ], 
  "loader": { 
    "orientdb": { 
       "dbURL": 
"plocal:/run/media/liveuser/IL_DISCO2/Sorint/OrientDB/orientdb-community-2.1.0/databases/example"
, 
       "dbType": "graph", 
       "dbAutoCreate": true, 
       "dbAutoCreateProperties": true, 
       "wal": false, 
       "tx": false, 
       "batchCommit": 100, 
       "classes": [ 
         {"name": "Node", "extends": "V"} 
       ],  
       "indexes": [ 
         {"class":"Node", "fields":["ID:integer"], "type":
"DICTIONARY_HASH_INDEX" } 
       ] 
    } 
  } 
}

relations.json
{ 
  "config" : {  
      "haltOnError": true, 
      "log": "info", 
      "parallel": false 
  }, 
  "source": { "file": { "path": "relations.csv", "lock": false} }, 
  "extractor": { "row": {} }, 
  "transformers": [ 
    { "csv": {"separator": ";",  
        "columnsOnFirstLine": true, 
        "columns":  
          ["SOURCEID","DESTID","LABEL","PROPERTY1","PROPERTY2"] 
        }  
    }, 
    { 
        "command": {
            "command": "select from Node where ID = $input.out",
            "output": "sourceVert"
        }
    },
    {
        "command": {
            "command": "select from Node where ID = $input.in",
            "output": "destVert"
        }
    },
    {
        "command": {
            "command": "create edge RelationOut from $sourceVert to 
$destVert",
            "output": "relazione"
        }
    }
  ], 
  "loader": { 
    "orientdb": { 
       "dbURL": 
"plocal:/run/media/liveuser/IL_DISCO2/Sorint/OrientDB/orientdb-community-2.1.0/databases/example"
, 
       "dbType": "graph", 
       "dbAutoCreate": true, 
       "dbAutoCreateProperties": true, 
       "wal": true, 
       "tx": false, 
       "batchCommit": 100, 
       "classes": [        
         {"name": "Node", "extends": "V"}, 
         {"name": "RelationOut", "extends": "E"}, 
       ] 
    } 
  } 
} 




Regards,
Ivan

-- 

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