Hi,
I hope this example helps:

https://github.com/orientechnologies/orientdb-etl/wiki/Import-from-JSON

Lvc@
ᐧ

On 29 January 2015 at 16:54, David Sedeño <[email protected]> wrote:

> Hi Emin,
>
> Could you solve your problem? I have similar issue, how to get an
> orientdocument and create an edge to another one (both just inserted
> previously into orientdb).
>
> Thanks
> ---
> David Sedeño
>
> El martes, 9 de diciembre de 2014, 4:34:42 (UTC+1), Emin Agassi escribió:
>
>> Hello Lvc,
>>
>> Thank you for your reply. I did look at the CSV to Graph load example
>> however my use case is a bit different.
>> Currently, I have the ETL Json file that loads all Vertexes from one
>> RDBMS table.
>> Second, I have the table that contains relationships between the concepts.
>> Basically, I have a graph stored in RDBMS. I am trying to load this graph
>> into OrientDB.
>> The first ETL is very fast. I can load 1.5 million records into OrientDB
>> Vertexes in 8 minutes.
>>
>> I am not sure how to load Edges, the relationships between Vertexes which
>> I have loaded from a separate table.
>> I tried this:
>>
>> "transformers" : [
>>     {
>>       "command" : {
>>         "command" : "create edge from (select flatten(@rid) from V where
>> Id = ${input.c1}) to (select flatten(@rid) from V where Id = ${input.c2})",
>>         "output" : "edge"
>>       }
>>     }
>>   ],
>>
>> where c1 and c2 are Ids of left and right concepts in the relationships
>> respectively. However, this ETL ran for more than 1 hour and finally failed
>> OutOfMemory.
>> Again, my use case is different from CSV in that I have:
>>
>> Table1
>> Id          Name
>> 1           Bob
>> 2           Mary
>> 3            Ken
>>
>> Table2
>> Id1    Rel   Id2
>> 1    MarriedTo  2
>> 1  hasSon     3
>> 2  hasSon   3
>> 3   hasParents  1
>> 3   hasParents   2
>>
>> Thanks for help
>> Emin
>>
>>
>>
>> On Monday, December 8, 2014 3:19:46 PM UTC-5, Lvc@ wrote:
>>>
>>> Hi Emin,
>>> Take a look at this guide:
>>>
>>> http://www.orientechnologies.com/docs/last/orientdb-etl.
>>> wiki/Import-from-CSV-to-a-Graph.html
>>>
>>> Lvc@
>>>
>>>
>>> On 8 December 2014 at 19:06, Emin Agassi <[email protected]> wrote:
>>>
>>>>
>>>>  Hi All,
>>>>
>>>>  I am using the OrientDb community version 2.0 M3.
>>>>
>>>>  I am importing data from RDBMS using the new ETL process.
>>>>  I have a JSON etl file to first import all concepts from table A.
>>>>  Then, I have a JSON etl file to import Edges from the table B. Table B
>>>> contains triplets: Concept1 Id - RelTo - Concept2 Id.
>>>>
>>>>  I cannot figure out how to create Edges using ETL and from my Table B
>>>> that contains all relationships between concepts.
>>>>
>>>>  Any help is appreciated!
>>>>
>>>>  --
>>>>
>>>> ---
>>>> 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.
>>>>
>>>
>>>  --
>
> ---
> 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.
>

-- 

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