Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 4203e20

Browse files
committed
Update to 0.15.3, add in kafka relationships example
1 parent 138fe64 commit 4203e20

8 files changed

Lines changed: 110 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.gradle
22
**/build/
33
!src/**/build/
4+
.DS_Store
45

56
# Ignore Gradle GUI config
67
gradle-app.setting

docker/data/custom/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jms {
210210

211211
kafka {
212212
kafkaAccount {
213-
kafka.bootstrap.servers = "kafkaserver:29092"
213+
kafka.bootstrap.servers = "kafka:29092"
214214
kafka.bootstrap.servers = ${?KAFKA_BOOTSTRAP_SERVERS}
215215
}
216216
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: "csv_multiple_relationships_plan"
22
tasks:
3-
- name: "csv_customer_files"
3+
- name: "csv_file"
44
dataSourceName: "csv"

docker/data/custom/plan/kafka.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "kafka_example_plan"
22
description: "Create account data in Kafka"
33
tasks:
4-
- name: "json_account_kafka"
4+
- name: "relationships_kafka"
55
dataSourceName: "kafkaAccount"
66
enabled: true
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "csv_test_files"
2+
steps:
3+
- name: "customers"
4+
type: "csv"
5+
options:
6+
path: "/opt/app/custom/csv/test/customers"
7+
header: true
8+
saveMode: "Overwrite"
9+
count:
10+
records: 1
11+
fields:
12+
- name: "id"
13+
type: "long"
14+
options:
15+
incremental: 1
16+
- name: "customer_id"
17+
options:
18+
uuid: ""
19+
incremental: 1
20+
- name: "first_name"
21+
options:
22+
expression: "#{Name.firstName}"
23+
- name: "last_name"
24+
options:
25+
expression: "#{Name.lastName}"
26+
- name: "accounts"
27+
type: "csv"
28+
options:
29+
path: "/opt/app/custom/csv/test/accounts"
30+
header: true
31+
saveMode: "Overwrite"
32+
count:
33+
records: 1
34+
fields:
35+
- name: "id"
36+
type: "long"
37+
options:
38+
incremental: 1
39+
- name: "customer_id"
40+
options:
41+
uuid: ""
42+
incremental: 1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "relationships_kafka"
2+
steps:
3+
- name: "customer"
4+
type: "kafka"
5+
count:
6+
records: 2
7+
options:
8+
topic: "customer-topic"
9+
fields:
10+
- name: "key"
11+
type: "string"
12+
options:
13+
sql: "body.customer_id"
14+
- name: "messageBody"
15+
type: struct
16+
fields:
17+
- name: "customer_id"
18+
options:
19+
uuid: ""
20+
incremental: 1
21+
- name: "first_name"
22+
options:
23+
expression: "#{Name.firstName}"
24+
- name: "last_name"
25+
options:
26+
expression: "#{Name.lastName}"
27+
- name: "customer_product"
28+
type: "kafka"
29+
count:
30+
records: 2
31+
perField:
32+
count: 2
33+
fieldNames:
34+
- "body.customer_id"
35+
options:
36+
topic: "customer-topic"
37+
fields:
38+
- name: "key"
39+
type: "string"
40+
options:
41+
sql: "body.customer_id"
42+
- name: "customer_product_id_int"
43+
type: "int"
44+
options:
45+
min: 10
46+
max: 12
47+
omit: true
48+
- name: "messageBody"
49+
type: struct
50+
fields:
51+
- name: "customer_id"
52+
options:
53+
uuid: ""
54+
incremental: 1
55+
isPrimaryKey: true
56+
- name: "customer_product_id"
57+
options:
58+
uuid: "customer_product_id_int"
59+
isPrimaryKey: true

docker/data/kafka/setup_kafka.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ kafka-topics --bootstrap-server $host:29092 --create --if-not-exists --topic acc
88
echo 'Successfully created the following topics:'
99
kafka-topics --bootstrap-server $host:29092 --list
1010

11-
#kafka-topics --delete --topic account-topic --bootstrap-server localhost:9092
11+
#kafka-topics --delete --topic account-topic --bootstrap-server localhost:9092
12+
#kafka-topics --bootstrap-server localhost:9092 --create --topic customer-product-topic --replication-factor 1 --partitions 1
13+
#kafka-console-consumer --bootstrap-server localhost:9092 --topic customer-product-topic --from-beginning
14+
#kafka-console-consumer --bootstrap-server localhost:9092 --topic customer-topic --from-beginning

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ version=0.1.0
88

99
scalaVersion=2.12
1010
scalaSpecificVersion=2.12.19
11-
dataCatererVersion=0.15.2
11+
dataCatererVersion=0.15.3
1212
sparkMajorVersion=3.5

0 commit comments

Comments
 (0)