简体   繁体   中英

Neo4j Upsert using apoc procedure

I am using apoc.load.jdbc command to connect snowflake and loading data to Neo4j. Is there any way to use the update command if data already exists and insert it if there is no data(like upsert) in neo4j?

WITH "jdbc:snowflake://xxxx.xxxx.xxxx.com:xxx/?user=xxxxxxxxxxx&password=xxxxxxxxxxx&db=xxxx&warehouse=xxxx&schema=xxxx" as url CALL apoc.load.jdbc(url,"test_table') YIELD row create (c:test) set c=row

Also, is it possible to do an upsert based on Neo4j Label?

I think MERGE is what you are looking for. See https://neo4j.com/docs/cypher-manual/current/clauses/merge/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM