Fast Data Loading

I want to import data quickly with dgraph live.

The RDF format is as follows:

<1> <name> "0000000" .
<2> <name> "00000000" .
<3> <name> "000000000" .
<4> <name> "0000000000" .
<5> <name> "00000000000" .

I expect uid to be generated according to my settings,Such as:1,2,3,4…, But the result is not what I expected.

When I perform this operation on the console:

{
  set{
     <1> <name> "0000000" .
     <2> <name> "00000000" .
     <3> <name> "000000000" .
     <4> <name> "0000000000" .
     <5> <name> "00000000000" .
  }
}

The result is right. Query uid equals 1,2,3…

Can’t dgraph live set uid?

I have a 500 million vertex data and 1 billion sides data .I want to import data quickly. Who can provide a plan?

thanks!

Use bulk loader…
https://docs.dgraph.io/deploy#bulk-loader

2 Likes

Can draph live not set uid to import data?

It can if you use _: prefix in your subjects; note however these unique only within a transaction.
Meaning using _:x as subject in two separate transactions will yield two distinct uids in graph.

If you want uniqueness across all you live loading transactions, then you would want to use the assign IDs endpoint, get uids, and use them as you subjects (in this case you would drop the _: prefix).

Regards,

S