We’re enabling the plugin to work as both a source and a sink. In the
NEO4J_streams_sink_topic_cypher_friendsitem, we’re writing a Cypher query. In this query, we’re
Personnodes. The plugin gives us a variable named
event, which we can use to pull out the properties we need. When we
MERGEnodes, it creates them only if they do not already exist. Finally, it creates a relationship between the two nodes
This sink configuration is how we’ll turn a stream of records from Kafka into an ever-growing and changing graph. The rest of the configuration handles our connection to a Confluent Cloud instance, where all of our event streaming will be managed for us. If you’re trying this out for yourself, make sure to replace
API_KEYwith the values that Confluent Cloud gives you when you generate an API access key.
Click through for the example.