Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-26-2022 04:35 AM
Image -1
Image -2
Image -3
With reference to the above 3 images, all the 3 images have the same query but in the first 2 images we have a match query commented and we are getting the output. The problem is in 3rd image, when I match both suggestion and steps I am not getting the output, can someone explain what's the problem here.
Thanks in advance.
Solved! Go to Solution.
08-26-2022 07:11 AM
You should execute the 'load csv' and return 'line' without the match to make sure the data lines up between 'Suggestions' and 'Steps' to ensure you should have matches for both concurrently. When its done separately, you may be getting output from different lines, but you don't have matches for both one each line. Just a thought, because the syntax looks good.
08-26-2022 05:03 AM
08-26-2022 05:38 AM
Hie, thanks for your reply but it doesn't work. I used "with line" at line 2 and 3, still getting nothing.
08-26-2022 05:42 AM
Can you try OPTIONAL MATCH for the second MATCH?
08-26-2022 05:52 AM
Hi, thanks for your reply, well on using OPTIONAL MATCH
Although p is returning null, it has values
08-26-2022 05:58 AM
You should add OPTIONAL on both MATCH I guess and check if the nodes exists with properties you got from your CSV.
08-26-2022 06:19 AM
I did try OPTIONAL MATCH for both, using "WITH" and without it and got the same below output.
If the nodes have properties? The below snaps are taken after querying using the queries from Image -1 and Image -2 (beginning of the thread) like without matching steps and suggestions simultaneously.
08-26-2022 06:41 AM
You added an "s" to Suggestion and Step whereas there are no "s" on your nodes properties.
08-26-2022 07:50 AM
Hie, yeah that's the first thing I checked, well below is a snap from the CSV.
If what you mentioned is the issue, we shouldn't be seeing outputs even when I don't match steps and suggestions simultaneously, but I am getting output when I match only one at a time.
08-26-2022 07:11 AM
You should execute the 'load csv' and return 'line' without the match to make sure the data lines up between 'Suggestions' and 'Steps' to ensure you should have matches for both concurrently. When its done separately, you may be getting output from different lines, but you don't have matches for both one each line. Just a thought, because the syntax looks good.
08-26-2022 07:42 AM
Or, add 'linenumber() AS number' to your output and run the query with the commented out matches to see if the line numbers are aligned.
08-26-2022 07:57 AM
But I don't get how this impacts the KG from showing the output, as I just wanted those output which matches. Thanks a lot anyways.
08-26-2022 08:23 AM
What is the KG?
08-27-2022 02:05 AM
Knowledge Graph.
08-27-2022 02:40 AM
Is the intent to use this file to create the data? If so, switch your matches to merges and the missing data will be created and you can continue with your script.
All the sessions of the conference are now available online