Skip to content

Instantly share code, notes, and snippets.

David Fauth davidfauth

Block or report user

Report or block davidfauth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidfauth
davidfauth / kafka_neo4j_ssl.adoc
Created Oct 14, 2019
Kafa Neo4j SSL Configuration
View kafka_neo4j_ssl.adoc

Overview:

This document, Neo4j Security with Kafka Streams, provides guidance to configure SSL security between Kafka and Neo4j. This will provide data encryption between Kafka and Neo4j.

This does not address ACL confguration inside of KAFKA.

Self Signed Certificates

This section came from https://medium.com/talking-tech-all-around/how-to-enable-and-verify-client-authentication-in-kafka-21e936e670e8
Make sure that you have truststore and keystore JKSs for each server.+ In case you want a self signed certificate, you can use the following commands:+

View SparkToNeo4j.html
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<meta name="databricks-html-version" content="1">
<title>Neo4j Chicago Crime Notebook - Databricks</title>
<meta charset="utf-8">
<meta name="google" content="notranslate">
<meta name="robots" content="nofollow">
View Neo4j-Databricks-Example.txt
#Step 1
%python
#write a file to DBFS using Python I/O APIs
with open("/dbfs/tmp/neo4_test.csv", 'w') as f:
f.write("id,name,emp_id,employer\n")
for x in range(500):
f.write(str(x) + ",name_" + str(x) + "," + str(x) + ",emp_name_" + str(x) + "\n")
f.close()
#Step 2 Load to Dataframe
@davidfauth
davidfauth / docker-compose-4_0.yml
Created Sep 24, 2019
Docker 4.0.0 Compose.yml
View docker-compose-4_0.yml
version: '3'
networks:
lan:
services:
core1:
image: neo4j:4.0.0-alpha10-enterprise
networks:
@davidfauth
davidfauth / Neo4j_4_0_DriverWriteTest
Created Aug 26, 2019
Neo4jDriverWrite_40Cluster
View Neo4j_4_0_DriverWriteTest
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.logging.Level;
import static java.util.concurrent.TimeUnit.SECONDS;
import java.time.Duration;
import java.time.Instant;
View Neo4jDriverWriteTest.java
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.logging.Level;
import static java.util.concurrent.TimeUnit.SECONDS;
import java.time.Duration;
import java.time.Instant;
View rbac.cql
CREATE DATABASE library;
CREATE DATABASE c360;
CREATE DATABASE iam;
SHOW DATABASES;
:use system;
START DATABASE library;
START DATABASE c360;
View docker-compose-bloom.yml
version: '3'
services:
accenture:
image: neo4j:3.5.8-enterprise
ports:
- 7474:7474
- 7473:7473
View kafkaNeo4j_Cluster
### Neo4j.conf
kafka.zookeeper.connect=172.xx.xx.xx:2181
kafka.bootstrap.servers=172.xx.xx.xx:9092
streams.sink.enabled=true
streams.sink.polling.interval=1000
streams.sink.topic.cypher.Neo4jPersonTest=MERGE (p:Person{name: event.name, surname: event.surname}) MERGE (f:Family{name: event.surname}) MERGE (p)-[:BELONGS_TO]->(f)
streams.sink.topic.cypher.blogpost_maxmind_albums=FOREACH(ignoreMe IN CASE WHEN event.type='insert' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) on match set c.name = event.data.name on create set c.name = event.data.name) FOREACH(ignoreMe IN CASE WHEN event.type='delete' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) detach delete c) FOREACH(ignoreMe IN CASE WHEN event.type='update' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) set c.name=event.data.name, c.genre=event.data.genre)
streams.sink.topic.cypher.blogpost_maxmind_users=FOREACH(ignoreMe IN CASE WHEN event.type='insert' THEN [1] ELSE [] END | MERGE (u:User{id:event.data.id}) on match set u.nam
View pythonNeo4jUberH3
import simplejson
from urllib.request import urlopen
import urllib.request
import urllib.parse
from neo4j.v1 import GraphDatabase
import time
uri = "bolt://localhost:7687"
driver = GraphDatabase.driver(uri, auth=("neo4j", "changeYourPassword"))
You can’t perform that action at this time.