orientdb - Create Edges by ETL in same Class -


1) class items itemid , name ready in database. 2) csv-file: 2 columns,

itemid1,itemid2001  itemid1,itemid2345  itemid1,itemid2381 

...

itemid2,itemid8393  itemid2,itemid8743 

.. etc.

question:

how define etl json-file create edges between itemid1 , itemid's in col#2, , between itemid2 , col#2-peers.

i tried reproduce problem.

i had items

enter image description here

and code connected them

{   "source": { "file": { "path": "mypath/item.csv" } },   "extractor": {"row": {}},     "transformers": [{         "csv": {             "separator": ","         }     },     {     "command" : {             "command" : "create edge (select item iditem= '${input.iditem1}') (select item iditem= '${input.iditem2}')",             "output" : "edge"         }     }   ],   "loader": {     "orientdb": {        "dburl": "plocal:mypath/mydb",        "dbtype": "graph"     }   } } 

and got

enter image description here

hope helps.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -