Hi,

Is there a way to create edges from consecutive vertices in the same class ?
I've been trying to do is by loading a csv file with vertices and edges 
information. The vertices are created without a problem but the edges are 
either not created and no error is give or i get an error mentioning 
duplicate records even if there are no duplicate records in the file.

The Orientdb version i'm using is 2.0.12 

here is a sample of the file i want to load :

reference_nt_L1,previous_nt,coordinate,assembly_L2,chromosome_L3,position_L3
T,chr13:20187463,chr13:20187464,hg19,chr13,20187464
T,chr13:20187464,chr13:20187465,hg19,chr13,20187465
T,chr13:20187465,chr13:20187466,hg19,chr13,20187466
A,chr13:20187466,chr13:20187467,hg19,chr13,20187467


the json file 
{
  "source": { "file": { "path": "/home/jenica/data/chrfrags/gjb2_frag.csv" 
} },
  "extractor": { "row": {} },
  "transformers": [
    { "csv": {} },
    { "vertex": { "class": "position_L1" } },
    { "edge": { "class": "previous_nt",
                "joinFieldName": "coordinate",
                "lookup": "position_L1.previous_nt",
                "direction": "in"
            }
        }
  ],
  "loader": {
    "orientdb": {
       "dbURL": 
"plocal:/home/jenica/programs/orientdb-community-2.0.12/databases/blog10",
       "dbType": "graph",
       "classes": [
         {"name": "position_L1", "extends": "V"},
         {"name": "previous_nt", "extends": "E"}
       ], "indexes": [
         {"class":"position_L1", "fields":["nt:string"], "type":"UNIQUE" }
       ]
    }
  }
}

and the error i get 

OrientDB etl v.2.0.12 (build @BUILD@) www.orientechnologies.com
BEGIN ETL PROCESSOR
Error in Pipeline execution: 
com.orientechnologies.orient.core.storage.ORecordDuplicatedException: 
Cannot index record 
position_L1{reference_nt_L1:T,previous_nt:chr13:20187462,coordinate:chr13:20187463,assembly_L2:hg19,chromosome_L3:chr13,position_L3:20187463}:
 
found duplicated key 'chr13:20187463' in index 'position_L1.coordinate' 
previously assigned to the record #11:0 RID=#11:0
com.orientechnologies.orient.core.storage.ORecordDuplicatedException: 
Cannot index record 
position_L1{reference_nt_L1:T,previous_nt:chr13:20187462,coordinate:chr13:20187463,assembly_L2:hg19,chromosome_L3:chr13,position_L3:20187463}:
 
found duplicated key 'chr13:20187463' in index 'position_L1.coordinate' 
previously assigned to the record #11:0 RID=#11:0
    at 
com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.checkEntry(OIndexTxAwareOneValue.java:225)
    at 
com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexedPropertiesOnCreation(OClassIndexManager.java:326)
    at 
com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexes(OClassIndexManager.java:570)
    at 
com.orientechnologies.orient.core.index.OClassIndexManager.onRecordBeforeCreate(OClassIndexManager.java:395)
    at 
com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:218)
    at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHooks(ODatabaseDocumentTx.java:986)
    at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1721)
    at 
com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:102)
    at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2312)
    at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:118)
    at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1727)
    at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1718)
    at 
com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:311)
    at 
com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:291)
    at 
com.tinkerpop.blueprints.impls.orient.OrientElement.setProperty(OrientElement.java:186)
    at 
com.orientechnologies.orient.etl.transformer.OVertexTransformer.executeTransform(OVertexTransformer.java:69)
    at 
com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
    at 
com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:110)
    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: 
com.orientechnologies.orient.core.storage.ORecordDuplicatedException: 
Cannot index record 
position_L1{reference_nt_L1:T,previous_nt:chr13:20187462,coordinate:chr13:20187463,assembly_L2:hg19,chromosome_L3:chr13,position_L3:20187463}:
 
found duplicated key 'chr13:20187463' in index 'position_L1.coordinate' 
previously assigned to the record #11:0 RID=#11:0

thank you
Jenica

-- 

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