Creating a new node from relational database


(Jcuevasmunoz) #1

Hi,

I have a connection between SQL SERVER to my neo4j db using APOC. I created a node called "People" and have 88 people in the graph. My question is: if I add a person on my relational database, how can I see that person in my neo4j database as new node?

Best.


(Ameyasoft) #2

Hi,

I am having some problems in connecting my sql server to Neo4j. I appreciate sharing the steps you took to make the connection.
Thanks,
-Kamal


(Jcuevasmunoz) #3

Hi, Kamal:

I connected SQL SERVER using APOC.

1.- Install APOC in neo4j.
2.- Create a query, in my case:

call apoc.load.jdbc(jdbc:sqlserver://localhost:1433;databaseName=DATABASENAME;user=USER;password=PASSWORD,'House') 
yield row
create (p:House) 
set p=row
set p.NodeName = 'House';

I don't have a connection automatically, but now, I'm searching how I can do it.


(Ameyasoft) #4

Hi,

Thanks for sharing the code and that really helped me. I could connect to my sql server.

For updating, check this Kafka integration article by Michael Hunger:

-Kamal