Skip to content

Commit

Permalink
remove primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterZh6 committed Nov 13, 2024
1 parent 71bc6f9 commit eaea173
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE test_input (
`id` INT primary key,
id INT,
name STRING,
description STRING
) WITH (
Expand All @@ -16,7 +16,7 @@ CREATE TABLE test_input (
);

CREATE TABLE kafka_load (
`id` INT NOT NULL primary key,
id INT,
name STRING,
description STRING
) WITH (
Expand All @@ -28,7 +28,7 @@ CREATE TABLE kafka_load (
);

CREATE TABLE kafka_extract (
`id` INT NOT NULL,
id INT,
name STRING,
description STRING
) WITH (
Expand All @@ -41,7 +41,7 @@ CREATE TABLE kafka_extract (
);

CREATE TABLE test_output (
`id` INT primary key,
id INT,
name STRING,
description STRING
) WITH (
Expand All @@ -57,5 +57,8 @@ CREATE TABLE test_output (
'sink.buffer-flush.interval-ms' = '1000'
);

INSERT INTO kafka_load select * from test_input;
INSERT INTO test_output select * from kafka_extract;
-- Insert data from MySQL source into Kafka
INSERT INTO kafka_load SELECT * FROM test_input;

-- Insert data from Kafka into StarRocks sink
INSERT INTO test_output SELECT * FROM kafka_extract;

0 comments on commit eaea173

Please sign in to comment.