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.

LOAD JSON INTO NEO4j through nodes which already exists

i have json which is in format
{'regulon': 'R-0', 'hallmark': 'SelfSufficiencyInGrowthSignals', 'value': 1.0, 'modal': 'BRCA', 'version': '1.0'},
{'regulon': 'R-1328', 'hallmark': 'InsensitivityToAntigrowthSignals', 'value': nan, 'modal': 'BRCA', 'version': '1.0'}

I have node Regulon which has regulon-id eg R-0
I have node mark which has marks eg:SelfSufficiencyInGrowthSignals and InsensitivityToAntigrowthSignals

now i wanted to match regulon id with json file regulon
and match mark with json file hallmark and generate only one relationship between them along with json file value as edge property

1 REPLY 1

anthapu
Graph Fellow

Hi,
You can use MATCH or MERGE to do that. While I'm not entirely clear about this.

"I have node mark which has marks eg:SelfSufficiencyInGrowthSignals and InsensitivityToAntigrowthSignals"

A sample node with MATCH would be

MATCH (r1: Regulon {id:'R-0'})
MATCH (r2: Regulon {id:'R-1328'})

This query would return nodes with those ID's.

MERGE (r1: Regulon {id:'R-0'})
MERGE (r2: Regulon {id:'R-1328'})

This query would create the node with the specified if it does not exist. If it already exists the node would be returned. Think of it like insert/update logic.

If you can elaborate a bit further it might be easier to provide how you can do it.