Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add store_xids to Liveloader #5106

Closed
MichelDiz opened this issue Apr 4, 2020 · 2 comments
Closed

Add store_xids to Liveloader #5106

MichelDiz opened this issue Apr 4, 2020 · 2 comments
Assignees
Labels
area/live-loader Issues related to live loading. dgraph Issue or PR created by an internal Dgraph contributor. kind/enhancement Something could be better. Stale status/accepted We accept to investigate/work on it.

Comments

@MichelDiz
Copy link
Contributor

Experience Report

This ticket is related to #4917

--store_xids:

A feature that exists only in Bulkloader. It takes the XID or blank node and saves it to the same node as a property of it with the predicate name as "xid". e.g.:

<_:MichelDiz> <name> "Michel" .

It will be recorded as 

{
  "data": {
    "q": [
      {
        "name": "Michel",
        "xid": "_:MichelDiz"
      }
    ]
  }

This functionality at first does not seem useful. But I'm sure it's related to the approach on external IDs https://docs.dgraph.io/mutations/#external-ids

e.g.:

<0x321> <xid> "https://www.themoviedb.org/person/32-robin-wright" .

It can be useful in this case and we can use Upsert Block. But it is not useful for those who need to ingest large amounts of data. Only small cases.

@MichelDiz MichelDiz added kind/enhancement Something could be better. status/accepted We accept to investigate/work on it. area/live-loader Issues related to live loading. labels Apr 4, 2020
@MichelDiz
Copy link
Contributor Author

MichelDiz commented Apr 7, 2020

Observation: One thing I noticed in recent tests is that store_xids stores only real XIDs. I think It should store any kind of value except UIDs in fact. So my example in this issue is slightly wrong. Cuz I'm exemplifying with a blank node <_:MichelDiz> not a XID.

Take for example the GraphQL feature #5128
The dev team behind the GraphQL feature is using XIDs that are not actually XIDs.
In general, XIDs are basically "URIs" from RDF concept. But we can extend this for any value except UIDs.

a bit of context https://discuss.dgraph.io/t/xid-in-other-graph-dbs/1555

We should make sure that these syntaxes are properly handled by store_xids.

<_:BlankNode> 
<eg:a> <eg:b> <"123"^^http://www.w3.org/2001/XMLSchema#int>
<eg:a> <eg:b> <"123"^^http://www.w3.org/2001/XMLSchema#unsignedByte>
<urn:lot2> ... ... .
<http://my.com/John> <http://purl.org/dc/elements/1.1/publisher> <http://publisher/
Xyz> .
<employee> 
 <employee/name>

@dgraph-io dgraph-io deleted a comment from minhaj-shakeel Feb 22, 2023
@MichelDiz MichelDiz reopened this Feb 22, 2023
@MichelDiz MichelDiz added the dgraph Issue or PR created by an internal Dgraph contributor. label Mar 7, 2023
Copy link

github-actions bot commented Aug 4, 2024

This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.

@github-actions github-actions bot added the Stale label Aug 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/live-loader Issues related to live loading. dgraph Issue or PR created by an internal Dgraph contributor. kind/enhancement Something could be better. Stale status/accepted We accept to investigate/work on it.
Development

No branches or pull requests

3 participants