How to Data Incremental Update

Recently I use Dgraph to store hollywood star information using spyder. I save the data and relation directly to dgraph at the beginning. But with the growth of acquisition time, I should retrieve whether the obtained data is in dgraph and get uid of this data. Is there any other good way to incrementally update data? E.g. when I have some hollywood star information in dgraph, then i know that Vin Diesel is the partner of dwayne Johnson, then i need to query the uid of diesel and johnson in dgraph separately to avoid the generation of redundant nodes, then using the uid to stock this rdf.

This is exactly how you should do this. You can query-then-mutate in a single transaction.

But if I want to update billions of rdfs? When i use dgraph live, RDFs processed per second can be 3000. But if I query-then-mutate, RDFs processed per second can only be hundreds of orders of magnitude. Is there any other better way to incrementally add data? In my application scenario, I started with only little data, most of the data is entered after the acquisition.