cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Define Boolean Values as Property when creating node or reading CSV

How to define a Boolean value as property when we create the node or when we read the CSV or atleast after reading CSV.

I am having a CSV file which has Boolean values as 0s and 1s. How to define them to the node as Boolean property?

1 ACCEPTED SOLUTION

Hello @vence.andersen17

There are several ways, you can use toBooleanOrNull() function. This function consider 0 as false and other integers as true.

Regards,
Cobra

View solution in original post

2 REPLIES 2

Hello @vence.andersen17

There are several ways, you can use toBooleanOrNull() function. This function consider 0 as false and other integers as true.

Regards,
Cobra

Yeah well I got it, thanks. But I went with "apoc.convert.toBoolean" since this seems to take care of null values.

Anyone with same issue, refer this link Check this