# Cannot merge the following node because of null property value for 'objectId': (:Object {objectId: null})

**URL:** <https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139>\
**Category:** Cypher\
**Tags:** load-csv\
**Created:** [May 28, 2024, 1:39pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139 "2024-05-28T13:39:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sulabhagrawal01](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sulabhagrawal01](https://community.neo4j.com/u/sulabhagrawal01)\
**Post date:** [May 28, 2024, 1:39pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/1 "2024-05-28T13:39:36Z")

</div>

I am trying to load a CSV file, but getting below error:

#### Neo.ClientError.Statement.SemanticError

Cannot merge the following node because of null property value for 'objectId': (:Object {objectId: null})

Query:  
LOAD CSV WITH HEADERS  
FROM '[Dropbox](https://www.dropbox.com/scl/fi/3o700qwtx2daqrgqrd061/CallObject.csv)' AS row  
FIELDTERMINATOR '|'  
MERGE (o:Object {objectId: toInteger(row.ObjectId)})  
SET  
o.objectName = row.ObjectName,  
o.objectApp = row.ObjectApp,  
o.objectType = row.ObjectType

Sample Data:

| ObjectId | ObjectApp | ObjectName | ObjectType | ObjectDDM | DBCreate | DBRead | DBUpdate | DBDelete | ETBT |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | ABC | ADA001 | P | ABCD-INKASSO | | Y | | | |
| 2 | ABC | ADA02N01 | N | ABCD-INKASSO | | Y | | | |
| 3 | ABC | ADA02P01 | P | | | | | | |
| 4 | ABC | ADA10N06 | N | ABCD-UMSATZ | | Y | | | |
| 5 | ABC | ADAA001 | P | | | | | | |
| 6 | ABC | ADAA0010 | P | | | | | | Y |
| 7 | ABC | ADAA002 | P | | | | | | |
| 8 | ABC | ADAA003 | P | ABCD-BEARBSCHR | | Y | | | Y |
| 9 | ABC | ADAA009 | P | | | | | | Y |
| 10 | ABC | ADAA01 | P | ABCD-BEARBSCHR | ABCD-INKASSO | | Y | | |

Initially I was below issue:

#### Neo.DatabaseError.Statement.ExecutionFailed

At [Dropbox](https://www.dropbox.com/scl/fi/3o700qwtx2daqrgqrd061/CallObject.csv) @ position 96538 - there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'environment":'

For which I added  
FIELDTERMINATOR '|'

Which resolve the error, but now I am facing null property error.

I am trying to create Nodes for all the object names.

Please suggest.

Thanks

---

<div class="post-metadata">

**Author:** ![florent\_biville](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/florent_biville/32/14205_2.png) [@florent\_biville](https://community.neo4j.com/u/florent_biville)\
**Post date:** [May 28, 2024, 1:47pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/2 "2024-05-28T13:47:56Z")

</div>

What about:

```auto
LOAD CSV WITH HEADERS
FROM 'Dropbox' AS row
FIELDTERMINATOR '|'
WITH row WHERE row.ObjectId IS NOT NULL
MERGE (o:Object {objectId: toInteger(row.ObjectId)})
SET
o.objectName = row.ObjectName,
o.objectApp = row.ObjectApp,
o.objectType = row.ObjectType

```

---

<div class="post-metadata">

**Author:** ![sulabhagrawal01](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sulabhagrawal01](https://community.neo4j.com/u/sulabhagrawal01)\
**Post date:** [May 28, 2024, 1:50pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/3 "2024-05-28T13:50:24Z")

</div>

Already tried this.  
Error has gone, but nothing happened.

(no changes, no records)

---

<div class="post-metadata">

**Author:** ![hakan.lofqvist1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/hakan.lofqvist1/32/10877_2.png) [@hakan.lofqvist1](https://community.neo4j.com/u/hakan.lofqvist1)\
**Post date:** [May 28, 2024, 2:00pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/4 "2024-05-28T14:00:07Z")

</div>

Try this:

```auto
LOAD CSV WITH HEADERS
FROM 'Dropbox' AS row
FIELDTERMINATOR '|'
RETURN row limit 1

```

So you can see how the csv is parsed and what the column headers are. Likely you have a spelling misstake and ObjectId is objectId or something like that (case sensitive, so get it right, it may also be a tailing space in the column name, so you may have to do row["ObjectId "] or row.`ObjectId ` )

---

<div class="post-metadata">

**Author:** ![sulabhagrawal01](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sulabhagrawal01](https://community.neo4j.com/u/sulabhagrawal01)\
**Post date:** [May 28, 2024, 2:07pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/5 "2024-05-28T14:07:28Z")

</div>

Something totally unexpected came in return:

{  
"": ""  
}

Now I am more worried and confused. But this explains my previous error.  
Please suggest how can I resolve this in my csv file.  
Data looks fine.

---

<div class="post-metadata">

**Author:** ![hakan.lofqvist1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/hakan.lofqvist1/32/10877_2.png) [@hakan.lofqvist1](https://community.neo4j.com/u/hakan.lofqvist1)\
**Post date:** [May 28, 2024, 2:53pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/6 "2024-05-28T14:53:49Z")

</div>

You can always start from here:

```auto
LOAD CSV FROM 'Dropbox' AS row
RETURN row limit 1

```

To see if the database can access the file at all. Then you add in "with header" and the right "fieldterminator".

---

<div class="post-metadata">

**Author:** ![sulabhagrawal01](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sulabhagrawal01](https://community.neo4j.com/u/sulabhagrawal01)\
**Post date:** [May 28, 2024, 4:44pm UTC](https://community.neo4j.com/t/cannot-merge-the-following-node-because-of-null-property-value-for-objectid-object-objectid-null/68139/7 "2024-05-28T16:44:50Z")

</div>

Thanks.  
It seems there is some issue with my csv file but I am not getting it.  
I created it again but still the same issue.

[CSV File](https://www.dropbox.com/scl/fi/iuwtp81uxkdaprethpenz/CallObject.csv?rlkey=mqgmer0zo4lbywuzpzmuzwpoj&st=nqm0ooi7&dl=0)

Could you please help me out with above CSV file, and suggest what I am missing.

Thanks
