If you have a timestamp or other flag in hive that shows the data as "new", you 
can use just a SELECT statement to get the information

In general you'd use merge with parameters for that:

MERGE (n:Label {id:{id}}) ON CREATE SET n.foo = {foo}, n.bar = {bar}

or if you always want to update properties

MERGE (n:Label {id:{id}})
SET n.foo = {foo}, n.bar = {bar}

For the actual run, there are several, options

You can also export the select results to CSV (or make that CSV available via 
http) and use LOAD CSV

LOAD CSV WITH HEADERS FROM "URL" as row
MERGE (n:Label {id:row.id}) ON CREATE SET n.foo = row.foo, n.bar = row.bar

or even

LOAD CSV WITH HEADERS FROM "URL" as row
MERGE (n:Label {id:row.id}) ON CREATE SET n += row


Or pass  in all rows of the batch in as parameters, e.g.  {id:id, data: 
{col1:value, col2:value})

UNWIND {rows} as row
MERGE (n:Label {id:row.id}) ON CREATE SET n += row.data

Michael

> Am 27.01.2016 um 06:55 schrieb Pranab Banerjee <[email protected]>:
> 
> Hi
> 
> This is regarding incremental Data Ingestion (Modify/New-Add) to Neo4j from 
> Hive Data source.
> 
> We need to incorporate the On-going "ChangeOnly/New" data load from source 
> table (in Hive) to Neo4j DB. 
> 
>     1. If node already exist in Neo4j DB then only update/modify that 
> specific node data.
>     2. If node doesn't  exist in Neo4j DB then append that specific node data 
> as a new
> 
> Can you please suggest any effective solution when the data volume is at 
> scale (~5 million rows per day).
> 
> Thanks
> Pranab
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to