cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How Best to Load Web Page Table or Input Data into Neo4j Data

RedInk
Node Link

I seem to be asking a lot of questions these days, thank you for your patience.

I have web pages using Node & EJS displaying data via APIs and that content is displayed in either a Table or Form Input fields. Here's an example...

tabsprops.PNG

I'm wondering if there are cypher queries that allow for the same kind of functionality as loading a .csv file i.e.

LOAD CSV FROM "File:///filename.csv" AS line

except where the source is ideally coming from a web page table?

I could export these web page tables as a csv file and then run the Load CSV From File query from a button, but I'd rather not.

One of the additional challenges seems to be getting my table info (or all of the various columns seen in the pic) to my server and cypher query. I can do this with hidden form input fields that mirror my table, but then another challenge is capturing all of the different req.body parameters and 'melding' these different properties into a Neo4j node. I suppose a json formatted version of my table would solve this.

Is there existing documentation/best practices for what I'm trying to do? If not, how might I go about this endeavor?

Many Thanks!

2 REPLIES 2

I suggest you look into using the neo4j driver for javaScript, Your node application can get the data from your front end and execute cypher using the javaScript driver to add the data directly to the neo4j server. I use the java driver to do the same in an angular/spring application I am building. I find it works very well.

https://neo4j.com/docs/javascript-manual/current/

There are two options that come to mind - @glilienfield suggests a good one, and that is to use Neo4j's Javascript driver. You also mention that your web page is using APIs already, so if you'd like to go that route, you could use GraphQL APIs - see https://neo4j.com/developer/graphql/ for more information about that.