forked from apache/inlong
-
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
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
...to-end-tests/sort-end-to-end-tests-v1.18/src/test/resources/env/kafka_test_kafka_init.txt
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 @@ | ||
kafka-topics --create --topic ${TOPIC} --replication-factor 1 --partitions 1 --zookeeper localhost:${ZOOKEEPER_PORT} |
61 changes: 61 additions & 0 deletions
61
...t-end-to-end-tests/sort-end-to-end-tests-v1.18/src/test/resources/flinkSql/kafka_test.sql
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,61 @@ | ||
CREATE TABLE test_input ( | ||
`id` INT primary key, | ||
name STRING, | ||
description STRING | ||
) WITH ( | ||
'connector' = 'mysql-cdc-inlong', | ||
'hostname' = 'mysql', | ||
'port' = '3306', | ||
'username' = 'root', | ||
'password' = 'inlong', | ||
'database-name' = 'test', | ||
'table-name' = 'test_input', | ||
'scan.incremental.snapshot.enabled' = 'false', | ||
'jdbc.properties.useSSL' = 'false', | ||
'jdbc.properties.allowPublicKeyRetrieval' = 'true' | ||
); | ||
|
||
CREATE TABLE kafka_load ( | ||
`id` INT NOT NULL primary key, | ||
name STRING, | ||
description STRING | ||
) WITH ( | ||
'connector' = 'upsert-kafka-inlong', | ||
'topic' = 'test-topic', | ||
'properties.bootstrap.servers' = 'kafka:9092', | ||
'key.format' = 'csv', | ||
'value.format' = 'csv' | ||
); | ||
|
||
CREATE TABLE kafka_extract ( | ||
`id` INT NOT NULL, | ||
name STRING, | ||
description STRING | ||
) WITH ( | ||
'connector' = 'kafka-inlong', | ||
'topic' = 'test-topic', | ||
'properties.bootstrap.servers' = 'kafka:9092', | ||
'properties.group.id' = 'testGroup', | ||
'scan.startup.mode' = 'earliest-offset', | ||
'format' = 'csv' | ||
); | ||
|
||
CREATE TABLE test_output ( | ||
`id` INT primary key, | ||
name STRING, | ||
description STRING | ||
) WITH ( | ||
'connector' = 'starrocks-inlong', | ||
'jdbc-url' = 'jdbc:mysql://starrocks:9030', | ||
'load-url'='starrocks:8030', | ||
'database-name'='test', | ||
'table-name' = 'test_output1', | ||
'username' = 'inlong', | ||
'password' = 'inlong', | ||
'sink.properties.format' = 'json', | ||
'sink.properties.strip_outer_array' = 'true', | ||
'sink.buffer-flush.interval-ms' = '1000' | ||
); | ||
|
||
INSERT INTO kafka_load select * from test_input; | ||
INSERT INTO test_output select * from kafka_extract; |