Skip to content

Adding more nodes and edges to existing database and creating relationships with existing nodes/edges #3594

Closed Answered by prrao87
kamalikaray asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kamalikaray, yes those are possible. I'll try to address each of your questions below:

1. Add nodes/edges to an existing database

This can be done in one of two ways. The first is for bulk import cases, where you want to add a large amount of data at once.

// Create node table
CREATE NODE TABLE Person(name STRING, age INT64, PRIMARY KEY (name));
// Run COPY FROM with a subquery
COPY Person FROM (LOAD FROM "person1.csv" RETURN *);
COPY Person FROM (LOAD FROM "person2.csv" RETURN *);

This allows you to individually import from different source files, assuming they conform to the schema. It also requires some prior work upfront to ensure that you do not have primary key conflicts in eith…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kamalikaray
Comment options

@prrao87
Comment options

Answer selected by kamalikaray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants