forked from confluentinc/demo-scene
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
273 additions
and
116 deletions.
There are no files selected for viewing
373 changes: 257 additions & 116 deletions
373
wifi-fun/Learning all about WiFi data with Apache Kafka.adoc
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
The above connector builds up a unique set of device -> SSID relationships, but does not capture each and every probe request. To do that we need to bring in a unique element into the data model; in this case I'm using the timestamp (extracted from the Kafka message timestamp into a new field `PROBE_TS` with a Single Message Transform) of the probe as an attribute of the edge `LOOKED_FOR_SSID` | ||
|
||
[source,sql] | ||
---- | ||
CREATE SINK CONNECTOR SINK_NEO4J_PROBES_02 WITH ( | ||
'connector.class'= 'streams.kafka.connect.sink.Neo4jSinkConnector', | ||
'topics'= 'pcap_probe_enriched_00', | ||
'neo4j.server.uri'= 'bolt://neo4j:7687', | ||
'neo4j.authentication.basic.username'= 'neo4j', | ||
'neo4j.authentication.basic.password'= 'connect', | ||
'neo4j.topic.cypher.pcap_probe_enriched_00'= 'MERGE (source:source{mac: event.SOURCE_ADDRESS, mac_resolved: event.SOURCE_ADDRESS_RESOLVED, device_name: coalesce(event.SOURCE_DEVICE_NAME,""), is_known: event.IS_KNOWN_DEVICE}) MERGE (ssid:ssid{name: coalesce(event.SSID, "")}) MERGE (ssid)<-[:LOOKED_FOR_SSID{when: event.PROBE_TS}]-(source)', | ||
'transforms'= 'ExtractTimestamp', | ||
'transforms.ExtractTimestamp.type'= 'org.apache.kafka.connect.transforms.InsertField$Value', | ||
'transforms.ExtractTimestamp.timestamp.field' = 'PROBE_TS' | ||
); | ||
---- |