Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-30-2022 03:47 PM
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...
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!
08-30-2022 07:55 PM
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.
08-31-2022 05:40 AM
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.
All the sessions of the conference are now available online