Simple CSV loaded with `apoc.load.csv` does not make all columns available as property keys

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):

New York City,city,,
Washington DC,city,,

#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

#3. The following is returned:

My question: why is 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)

Hello @cekohlbrenner :slight_smile:

I tried on Neo4j Database 4.3.1 and everything worked:

CALL apoc.load.csv('subjects-with-wikidata.csv') YIELD map
CREATE (s:Subject) SET s = map
MATCH (s:Subject)
RETURN s.category,, s.wikidataURL, s.wikipediaURL


Thanks @Cobra . I guess it's good to know I'm not missing anything in my syntax.

Any ideas why I'm getting a different result?

I'm on version 4.2.1. I guess I can try starting a new project or DB and see if I can reproduce in all cases.

call dbms.components() yield name, versions unwind versions as version return name, version;
│"name"        │"version"│
│"Neo4j Kernel"│"4.2.1"  │

Try to install the latest version of Neo4j :slight_smile:

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.