Result of n10s.rdf.import.fetch is non-intuitive

Hi I'm trying to import rdf data into neo4j.

Everything seemed fine, but I realized that the result of

CALL n10s.rdf.import.fetch 

Seems a little bit odd. I imported my rdf set. Then I imported it again, as expected there are no new nodes in the databse, but I checked for result of the import and there I can see
that result after the second import is like this.

╒═════════════════╤═════════════╤═════════════╤══════════╤═════════╤══════════╕
│terminationStatus│triplesLoaded│triplesParsed│namespaces│extraInfo│callParams│
╞═════════════════╪═════════════╪═════════════╪══════════╪═════════╪══════════╡
│"OK"             │54           │54           │null      │""       │{}        │
└─────────────────┴─────────────┴─────────────┴──────────┴─────────┴──────────┘

Mind you, it's second imoprt, so I though that triplesLoaded should be 0.

I think that I don't understand the output or it is misleading.

Thanks for your explanations :D.

@jesus_barrasa

Hi @kubazielinski19 , thanks for your question

You have a point, but the thing is the triples are actually written to the graph.
In your case the result is that the graph stays unchanged because you are importing the same data and it's not duplicated but blended with the existing one. But it's written and that's what that counter reflects.

If you're interested in computing the delta, as in what's new in the triples that I'm about to write compared to what's already in the graph, I'd recommend something like exporting the graph as RDF and doing an offline comparison in something like (RDFLib if you're a Python programmer, RDF4J if you prefer Java, etc...)

You can find an example of this delta computation in the code of Episode 19 of the Going Meta series. Hope this helps.

JB.