Hi,
Thanks for posting it. I thought this is a recurrent use case, so I
published your use case in the documentation:

http://orientdb.com/docs/last/Import-a-tree-structure.html

I'm sure other developers will find it useful ;-)

Lvc@


On 18 April 2015 at 10:50, <[email protected]> wrote:

> Hello again!
>
> Finally I managed to solve the issue. As I have no resource about the
> importing I will keep using this method.
> Finally I needed one CSV file, with ID, PARENT_ID, etc. fields.
> The the etl config file below worked for me:
>
>> {
>>   "source": { "file": { "path": "users.csv" } },
>>   "extractor": { "row": {} },
>>   "transformers": [
>>     { "csv": {} },
>>     { "vertex": { "class": "User" } },
>> { "edge": {
>> "class": "ParentOf",
>> "joinFieldName": "PARENT_ID",
>> "direction": "in",
>> "lookup": "User.ID"
>> }
>> }
>>   ],
>>   "loader": {
>>     "orientdb": {
>>        "dbURL": "plocal:/path/to/db",
>>        "dbType": "graph",
>>        "classes": [
>>          {"name": "User", "extends": "V"},
>>  {"name": "ParentOf", "extends": "E"}
>>        ], "indexes": [
>>          {"class":"User", "fields":["ID:Long"], "type":"UNIQUE" },
>>          {"class":"User", "fields":["PARENT_ID:Long"], "type":"NOTUNIQUE"
>> },
>>        ]
>>     }
>>   }
>> }
>
>
> I hope it will help others in the future!
>
> --
>
> ---
> 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.
>



-- 
Best Regards,

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli

-- 

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