Giter Site home page Giter Site logo

Comments (11)

jexp avatar jexp commented on July 18, 2024

Are you sure you have no duplicates? Seems that the activities might be duplicates per student? The lookup by id for the relationships only work for unique values (actually we could make them work for non-unique values by creating relationships for the cross product - would that be really what you wanted?).

So you might be needed to introduce a synthentic property for the activity to be indexed uniquely right now.

Are the snippets you shared enough to create the issue?

Please check the activity uniqueness, if they are unique, please try to create a dataset that fails and share it with me.

Thanks

from batch-import.

mkleszcz avatar mkleszcz commented on July 18, 2024

I checked the uniqueness. I made a test by placing only one activity and one student with one relation between and it fails the same way.

Files:
https://dl.dropboxusercontent.com/u/11823021/test/activities.csv
https://dl.dropboxusercontent.com/u/11823021/test/students.csv
https://dl.dropboxusercontent.com/u/11823021/test/rels.csv

from batch-import.

mkleszcz avatar mkleszcz commented on July 18, 2024

I try to debug code... There are duplicates but in the database. For some reason each node is twice inserted.

from batch-import.

himmatrana avatar himmatrana commented on July 18, 2024

duplicate node inserted

from batch-import.

jexp avatar jexp commented on July 18, 2024

Thanks for reporting, I look into it.

from batch-import.

himmatrana avatar himmatrana commented on July 18, 2024

thanks.
last node inserted twice

from batch-import.

Tooa avatar Tooa commented on July 18, 2024

Same Problem here:

Exception in thread "main" java.util.NoSuchElementException: More than one element in org.mapdb.Bind$5$1@1717d968. First element is '26802' and the second element is '27151'
at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:122)
at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:289)
at org.neo4j.batchimport.index.LongIterableIndexHits.getSingle(LongIterableIndexHits.java:33)
at org.neo4j.batchimport.index.LongIterableIndexHits.getSingle(LongIterableIndexHits.java:12)
at org.neo4j.batchimport.Importer.lookup(Importer.java:100)
at org.neo4j.batchimport.Importer.id(Importer.java:154)
at org.neo4j.batchimport.Importer.importRelationships(Importer.java:119)
at org.neo4j.batchimport.Importer.doImport(Importer.java:203)
at org.neo4j.batchimport.Importer.main(Importer.java:74)

But I do have duplicates for example:

identifier:string:TokenNode identifier:string:TokenNode occurence
a    b    OCCURENCE
a    a    OCCURENCE
a    b    OCCURENCE

According to the tip above, I tried to add a synthetic property to the relationthip called "id" and initialized with uuid4. Results in following like:

identifier:string:TokenNode identifier:string:TokenNode occurence id
a     a    OCCURENCE    515cfbe7-53ab-46a8-9eaa-acaa0d99ce49

But still the same Error. What am I doing wrong? Regards.

from batch-import.

jexp avatar jexp commented on July 18, 2024

It is about duplicate entries in your nodes-file.

Make sure to pull the latest version too.

from batch-import.

Tooa avatar Tooa commented on July 18, 2024

I cloned and compiled the repository two days ago. I'm sure my node file hasn't any duplicates. I created it with a map reduce on the count of words. You can see my files here:

https://www.dropbox.com/s/rv2lqgcfti0361a/nodes.csv
https://www.dropbox.com/s/cu2bc37w66xgs2b/relation.csv

Regards.

Update:

Figured the problem out. "spd" is imported as "spd" and so a duplicate entry in the node file exists. Don't know if it is a expected behaviour of the batch-importer. Thanks for help.

Update2:

Same problem. "\o" is equal to "o"

from batch-import.

szabogtamas avatar szabogtamas commented on July 18, 2024

I experience the same issue with the 2.0 importer.
I have no duplicates in my csv files, but during creation of relationships, I get the error regarding duplicate nodes.
Was this fixed for the master branch only? Or it was also fixed for the 2.0 branch and I'm doing something else wrong?
Thank you very much.

from batch-import.

jexp avatar jexp commented on July 18, 2024

Sorry, Neo4j 2.0 got rid of the Reference Node -> Node 0.

So your node-id's start now with 0, can you adapt your relationship-files and reimport?

Thanks.

from batch-import.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.