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

**URL:** https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246
**Category:** Neo4j Graph Platform
**Tags:** apoc, cypher, csv
**Created:** [July 12, 2021, 10:52am UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246 "2021-07-12T10:52:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cekohlbrenner](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cekohlbrenner/32/11386_2.png) [@cekohlbrenner](https://community.neo4j.com/u/cekohlbrenner)
#### Post date: [July 12, 2021, 10:52am UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246/1 "2021-07-12T10:52:16Z")

</div>

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

```auto
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:

```auto
CALL apoc.load.csv('/subjects-with-wikidata.csv') yield map as row
CREATE (s:Subject) SET s = row
RETURN s, s.name LIMIT 10

```

#3. The following is returned:

 ![null property](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/0/8/087d4ec46299cecf6389b4ecd7eb3b8e61f25f24.png)

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:

 ![other properties](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/8/9/8901c06623e119094f77167bc80a2ba4b7b99545.png)

Here is the full warning, but I don't understand why the property key is not in the database.

```auto
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)

```

---

<div class="post-metadata">

### Author: ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)
#### Post date: [July 12, 2021, 11:40am UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246/2 "2021-07-12T11:40:11Z")

</div>

Hello @cekohlbrenner 🙂

I tried on Neo4j Database 4.3.1 and everything worked:

```auto
CALL apoc.load.csv('subjects-with-wikidata.csv') YIELD map
CREATE (s:Subject) SET s = map
RETURN s, s.name LIMIT 10

```

```auto
MATCH (s:Subject)
RETURN s.category, s.name, s.wikidataURL, s.wikipediaURL

```

Regards,  
Cobra

---

<div class="post-metadata">

### Author: ![cekohlbrenner](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cekohlbrenner/32/11386_2.png) [@cekohlbrenner](https://community.neo4j.com/u/cekohlbrenner)
#### Post date: [July 12, 2021, 5:14pm UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246/3 "2021-07-12T17:14:12Z")

</div>

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.

```auto
call dbms.components() yield name, versions unwind versions as version return name, version;
╒══════════════╤═════════╕
│"name" │"version"│
╞══════════════╪═════════╡
│"Neo4j Kernel"│"4.2.1" │
└──────────────┴─────────┘

```

---

<div class="post-metadata">

### Author: ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)
#### Post date: [July 12, 2021, 6:30pm UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246/4 "2021-07-12T18:30:40Z")

</div>

Try to install the latest version of Neo4j 🙂

---

<div class="post-metadata">

### Author: ![cekohlbrenner](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cekohlbrenner/32/11386_2.png) [@cekohlbrenner](https://community.neo4j.com/u/cekohlbrenner)
#### Post date: [July 13, 2021, 10:44am UTC](https://community.neo4j.com/t/simple-csv-loaded-with-apoc-load-csv-does-not-make-all-columns-available-as-property-keys/41246/5 "2021-07-13T10:44:51Z")

</div>

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.
