Hi, new to Neo4j/Cypher/Apoc, not sure why this isn't working.
#1. I successfully import the following CSV (saved as subjects-with-wikidata.csv):
name,category,wikidataURL,wikipediaURL
New York City,city,https://www.wikidata.org/wiki/Q60,https://en.wikipedia.org/wiki/New_York_City
Washington DC,city,https://www.wikidata.org/wiki/Q61,https://en.wikipedia.org/wiki/Washington_D.C.
#2. I run the following Cypher query:
CALL apoc.load.csv('/subjects-with-wikidata.csv') yield map as row
CREATE (s:Subject) SET s = row
RETURN s, s.name LIMIT 10
My question: why is s.name null, even though a string (like "New York City") clearly exists as a property? This remains true regardless of the syntax, even though other properties are available:
Here is the full warning, but I don't understand why the property key is not in the database.
The provided property key is not in the database
One of the property names in your query is not available in the database, make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing property name is: name)
I've tried with latest version (4.3.2), but still have the same issue...seems like the first column of the CSV always has this issue.
My workaround is to put unneeded values in the first column, which makes it possible to return values for all the necessary properties. Storing extra unnecessary properties isn't ideal, but works for now.