Allow null when create relations

I need to create company and parent company relations from a json file, however some companies do not have parent companies, like this example
{ "company_id" : 2032,
"parent_company_id" : 343
{ "company_id" : 2332,
"parent_company_id" :

It is possible to create company-paranet company relation when a company has parent company, skip the company if it does not have parent company or substitute null with some characters?

Hi @jzhou002 ,

Welcome to the Graph Community.

I tried this with the below sample data and query :

"company_id" : 2032,
"parent_company_id" : 343
"company_id" : 2332,
"parent_company_id" :0


call apoc.load.json("file:///testjson.json")
yield value AS row
WITH row where row.parent_company_id<>0

Below is the output :


Please let me know if this is what you need or did I miss anything.

Oh cool. Thank you very much. I am new to cypher, a lot to learn.