Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions modules/ROOT/examples/docker-data/source.cdc.json-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Neo4jSourceConnectorJSONSchema",
"config": {
"connector.class": "org.neo4j.connectors.kafka.source.Neo4jConnector",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": true,
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": true,
"neo4j.uri": "neo4j://neo4j:7687",
"neo4j.authentication.type": "BASIC",
"neo4j.authentication.basic.username": "neo4j",
"neo4j.authentication.basic.password": "password",
"neo4j.source-strategy": "CDC",
"neo4j.start-from": "NOW",
"neo4j.cdc.poll-interval": "1s",
"neo4j.cdc.poll-duration": "5s",
"neo4j.cdc.topic.my-topic.patterns.0.pattern": "(:Person)",
"neo4j.cdc.topic.my-topic.patterns.0.operation": "create",
"neo4j.cdc.topic.my-topic.patterns.0.changesTo": "name,surname",
"neo4j.cdc.topic.my-topic.patterns.0.metadata.authenticatedUser": "neo4j",
"neo4j.cdc.topic.my-topic.patterns.0.metadata.executingUser": "neo4j",
"neo4j.cdc.topic.my-topic.patterns.0.metadata.txMetadata.app": "sales",
"neo4j.cdc.topic.my-topic.patterns.1.pattern": "(:Person)-[:KNOWS]->(:Person)",
"neo4j.cdc.topic.my-topic.patterns.1.operation": "update",
"neo4j.cdc.topic.my-topic.patterns.1.changesTo": "since",
"neo4j.cdc.topic.my-topic.patterns.1.metadata.authenticatedUser": "neo4j",
"neo4j.cdc.topic.my-topic.patterns.1.metadata.executingUser": "neo4j",
"neo4j.cdc.topic.my-topic.patterns.1.metadata.txMetadata.app": "sales"
}
}
21 changes: 21 additions & 0 deletions modules/ROOT/examples/docker-data/source.query.json-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Neo4jSourceConnectorJSONString",
"config": {
"connector.class": "org.neo4j.connectors.kafka.source.Neo4jConnector",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": true,
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": true,
"neo4j.uri": "neo4j://neo4j:7687",
"neo4j.authentication.type": "BASIC",
"neo4j.authentication.basic.username": "neo4j",
"neo4j.authentication.basic.password": "password",
"neo4j.source-strategy": "QUERY",
"neo4j.start-from": "NOW",
"neo4j.query": "MATCH (ts:TestSource) WHERE ts.timestamp > $lastCheck RETURN ts.name AS name, ts.surname AS surname, ts.timestamp AS timestamp",
"neo4j.query.streaming-property": "timestamp",
"neo4j.query.topic": "test-source",
"neo4j.query.polling-interval": "1s",
"neo4j.query.polling-duration": "5s"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "Neo4jSourceConnectorJSONString",
"config": {
"connector.class": "org.neo4j.connectors.kafka.source.Neo4jConnector",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": false,
"value.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": false,
"neo4j.uri": "neo4j://neo4j:7687",
"neo4j.authentication.type": "BASIC",
Expand Down
11 changes: 11 additions & 0 deletions modules/ROOT/pages/source/cdc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ include::example$docker-data/source.cdc.protobuf.json[]
----
=====

[.include-with-JSON-messages-with-embedded-schema]
=====
ifdef::backend-pdf[]
.source.cdc.protobuf.json
endif::[]
[source,json]
----
include::example$docker-data/source.cdc.json-schema.json[]
----
=====

====

We will now create the source instance by invoking the following REST call:
Expand Down
23 changes: 17 additions & 6 deletions modules/ROOT/pages/source/query.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,36 @@ include::example$docker-data/source.query.json.json[]
----
=====

[.include-with-JSON-messages-as-string]
[.include-with-PROTOBUF-messages]
=====
ifdef::backend-pdf[]
.source.query.json-string.json
.source.query.protobuf.json
endif::[]
[source,json]
----
include::example$docker-data/source.query.json-string.json[]
include::example$docker-data/source.query.protobuf.json[]
----
=====

[.include-with-PROTOBUF-messages]
[.include-with-JSON-messages-with-embedded-schema]
=====
ifdef::backend-pdf[]
.source.query.protobuf.json
.source.query.json-schema.json
endif::[]
[source,json]
----
include::example$docker-data/source.query.protobuf.json[]
include::example$docker-data/source.query.json-schema.json[]
----
=====

[.include-with-JSON-messages-as-string]
=====
ifdef::backend-pdf[]
.source.query.json-string.json
endif::[]
[source,json]
----
include::example$docker-data/source.query.json-string.json[]
----
=====

Expand Down