Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-02-2023 07:37 AM
Trying to get going with the new neo4j extension, and I'm having some trouble troubleshooting my troubles!
I added a connection to a remote db that I work on, but I get prompted with
if I try to run a .cypher file.
On the other hand it does seem to execute the query if I select the code and hit Ctrl+Alt+Space.
But I am skeptical it is working because a query returns No results (which returns an expected result via the neo4j browser).
Anyone who's using this with success?
02-03-2023 06:21 AM
Hey @stauntonjr , what are you trying to do when you get that debugger message? There aren't any debugging features in the plugin at the moment.
You should see the active database in the bar at the bottom of the screen or an asterisk next to the connection name in the menu bar to indicate the active database.
What query are you trying to run? All I can think is that a parameter has been cast with the wrong value or something. I'm happy to jump on a quick screen share to look at what is happening.
02-03-2023 07:09 AM
Thanks for the reply Adam, I had some query like MATCH (o:Organization WHERE id(o) = 123) RETURN o which was confirmed to work and return a node in neo4j browser. I had saved it as a file, test.cypher, and tried to "Run> Run without debugging [Ctrl+F5]" in vscode from the menubar.
02-03-2023 09:00 AM
The command for running the Cypher statement is separate from the Run command in VS Code - the commands are Neo4j: Run Cypher Statement in a Read Transaction and Neo4j: Run Cypher Statement in a Write Transaction. As for the query itself (assuming the bracket comes after Organization) it should return something. Maybe try MATCH (n) RETURN count(n)?
02-03-2023 01:48 PM - edited 02-03-2023 02:06 PM
Note the bracket doesn't come after Organization, I put the WHERE in the match as follows:
and you can see that's valid and returns something in neo4j browser. I'm new to neo4j so maybe I'm inadvertently using relatively new syntax.
But just to test if syntax was the issue here's the standard way:
with no result returned.
I can't really run
Match (n) Return count(n)
because we have billions of nodes and I don't want to break something. In the meantime, I'll see about finding/making a small test database for testing the connection.
I am able to interact with the database via the python driver in a vscode notebook, getting a correct result returned from a query as follows:
02-06-2023 03:12 AM
MATCH (n) RETURN count(n)
will hit the count store rather than the graph itself so it should return instantly. I can see that the number is different there to your screenshot but the likelihood of a node having that internal ID is pretty high. Shall we have a quick call to investigate? Feel free to pick a slot here.
02-06-2023 06:58 AM
Thanks very much Adam, I signed up for the 11:00 google meet.
All the sessions of the conference are now available online