Loading data using pydgraph

Not sure due to Timezone. Monday I’m having some meetings.

PS. If this data is public, give me the Link that I will run on my side.

The logic is simple.

You need to make sure that all entities are using the same BlankNode.

BlankNode is a unique temporary identifier that we use in RDF and mutations in general.

If you run two different transactions for Blank Node <_:New01> the Dgraph will not identify the UID of the first transaction. Because when committing the transaction, the context of the leasing UID is lost. So the solution is as follows.

  1. Run all RDFs in one transaction. Or upload them all in one batch via Liveloader. Liveloader can read all RDFs that are within a given Path.

  2. Or Start the first transaction with xidmap. Bulkloader also generates a map of xids. XID stands for “External IDs”.
    When running the command:
    dgraph live -x "~/pathTo/dgraphData/XIDs"
    You will save all UIDs mapped to each Blank Node identifier from your dump data.

You need to certify that they are unique according to their entity uniqueness. That is, Bob and all his attributes must have the same Blank Node. However, Alice and all her attributes do not.

1 Like