Comments (2)
Hi @seawolff
it seems to me your user_rels.tsv
represents properties for the users, not really relationships between users
or is there an implicit COMPANY end-node?
The first 2 columns in your rels file should represent the IDs of the start-node and end-node
(see https://github.com/jexp/batch-import#relscsv)
and the 3rd column should be the type of relationship
The subsequent columns represent additional properties of the relationship
then, with an additional 1st node representing the company,
and representing the relationship using "WORKS_AT",
you could write your files in this way:
nodes.tsv
id type name email full_name
1 COMPANY ACMECorp. [email protected] ACME Corporation
2 USER wolff [email protected] Wolff
3 USER test [email protected] Test
...
and
rels.tsv
startnode endnode relationtype type lang date_joined
2 1 WORKS_AT staff en-us 2010-09-22 11:58:10
3 1 WORKS_AT en-us 2010-09-29 12:00:09
...
Node 2 (user wolff) works at Node1 (ACME) as a staff member, speaks English, and joined on Sep. 22, 2010
Node 3 (user test) works at Node1 (ACME) (role in company undefined), speaks English, and joined on Sep. 29, 2010
Hope this helps.
from batch-import.
Note that the "id" column in user.tsv will be used as just another property for the node, not the Node ID in Neo4J
Using batch-import
it's the order in which the nodes appear in the nodes file that should be used as reference for the rels file
In other words, you could have:
id type name email full_name
2597 COMPANY ACMECorp. [email protected] ACME Corporation
1350 USER wolff [email protected] Wolff
93754 USER test [email protected] Test
and still define the relationships using:
startnode endnode relationtype type lang date_joined
2 1 WORKS_AT staff en-us 2010-09-22 11:58:10
3 1 WORKS_AT en-us 2010-09-29 12:00:09
from batch-import.
Related Issues (20)
- Make Chunker.BUFSIZE a configuration option HOT 1
- Index lookup in relationship file throws NumberFormatException HOT 1
- Cannot connect to graphdb created by batch-import tool in Windows OS HOT 3
- NumberFormatException when importing relationships file HOT 1
- Rename master branch to 1.9 HOT 1
- Slow Import / 2G nodes file HOT 2
- Import Error HOT 1
- Error running batch_importer_22 HOT 3
- No relations input
- How can I know which line is it crashing on? HOT 1
- View graph in Neo4j Browser after importing HOT 3
- Imported csv files successfully but query results are empty
- common interface for BatchInserter and GraphDatabaseService?
- Why Batch-Importer is not work when i import about one hundred million nodes?
- Improt error,emergency!!!!
- How can i use this tool to import data that may be duplicated HOT 1
- Download link to binary is broken HOT 2
- Failed to load csv in Neo4j Ver 3.3
- An exception occured while executing the Java class. More than one element in org.mapdb.Bind$5$1@46248627. First element is '983727989' and the second element is '997379223' HOT 1
- version 3.4.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batch-import.