You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/guides/40-load-data/02-load-db/debezium.md
+2-88Lines changed: 2 additions & 88 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,92 +89,6 @@ services:
89
89
docker-compose up -d
90
90
```
91
91
92
-
## Usage Example
92
+
## Tutorials
93
93
94
-
This section demonstrates the general steps to load data from MySQL into Databend and assumes that you already have a local MySQL instance running.
95
-
96
-
### Step 1. Prepare Data in MySQL
97
-
98
-
Create a database and a table in MySQL, and insert sample data into the table.
99
-
100
-
```sql
101
-
CREATEDATABASEmydb;
102
-
USE mydb;
103
-
104
-
CREATETABLEproducts (id INTEGERNOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(255) NOT NULL,description VARCHAR(512));
105
-
ALTERTABLE products AUTO_INCREMENT =10;
106
-
107
-
INSERT INTO products VALUES (default,"scooter","Small 2-wheel scooter"),
108
-
(default,"car battery","12V car battery"),
109
-
(default,"12-pack drill bits","12-pack of drill bits with sizes ranging from #40 to #3"),
110
-
(default,"hammer","12oz carpenter's hammer"),
111
-
(default,"hammer","14oz carpenter's hammer"),
112
-
(default,"hammer","16oz carpenter's hammer"),
113
-
(default,"rocks","box of assorted rocks"),
114
-
(default,"jacket","water-proof black wind breaker"),
115
-
(default,"cloud","test for databend"),
116
-
(default,"spare tire","24 inch spare tire");
117
-
```
118
-
119
-
### Step 2. Create database in Databend
120
-
121
-
Create the corresponding database in Databend. Please note that you don't need to create a table that corresponds to the one in MySQL.
122
-
123
-
```sql
124
-
CREATEDATABASEdebezium;
125
-
```
126
-
127
-
### Step 3. Create application.properties
128
-
129
-
Create the file _application.properties_, then start debezium-server-databend. For how to install and start the tool, see [Installing debezium-server-databend](#installing-debezium-server-databend).
130
-
131
-
When started for the first time, the tool performs a full synchronization of data from MySQL to Databend using the specified Batch Size. As a result, the data from MySQL is now visible in Databend after successful replication.
You're all set! If you query the products table in Databend, you will see that the data from MySQL has been successfully synchronized. Feel free to perform insertions, updates, or deletions in MySQL, and you will observe the corresponding changes reflected in Databend as well.
94
+
-[Migrating from MySQL with Debezium](/tutorials/migrate/migrating-from-mysql-with-debezium)
In this tutorial, you will load data from MySQL to Databend with Debezium. Before you start, make sure you have successfully set up Databend, MySQL, and Debezium in your environment.
6
+
7
+
## Step 1. Prepare Data in MySQL
8
+
9
+
Create a database and a table in MySQL, and insert sample data into the table.
10
+
11
+
```sql
12
+
CREATEDATABASEmydb;
13
+
USE mydb;
14
+
15
+
CREATETABLEproducts (id INTEGERNOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(255) NOT NULL,description VARCHAR(512));
16
+
ALTERTABLE products AUTO_INCREMENT =10;
17
+
18
+
INSERT INTO products VALUES (default,"scooter","Small 2-wheel scooter"),
19
+
(default,"car battery","12V car battery"),
20
+
(default,"12-pack drill bits","12-pack of drill bits with sizes ranging from #40 to #3"),
21
+
(default,"hammer","12oz carpenter's hammer"),
22
+
(default,"hammer","14oz carpenter's hammer"),
23
+
(default,"hammer","16oz carpenter's hammer"),
24
+
(default,"rocks","box of assorted rocks"),
25
+
(default,"jacket","water-proof black wind breaker"),
26
+
(default,"cloud","test for databend"),
27
+
(default,"spare tire","24 inch spare tire");
28
+
```
29
+
30
+
## Step 2. Create database in Databend
31
+
32
+
Create the corresponding database in Databend. Please note that you don't need to create a table that corresponds to the one in MySQL.
33
+
34
+
```sql
35
+
CREATEDATABASEdebezium;
36
+
```
37
+
38
+
## Step 3. Create application.properties
39
+
40
+
Create the file _application.properties_, then start debezium-server-databend. For how to install and start the tool, see [Installing debezium-server-databend](#installing-debezium-server-databend).
41
+
42
+
When started for the first time, the tool performs a full synchronization of data from MySQL to Databend using the specified Batch Size. As a result, the data from MySQL is now visible in Databend after successful replication.
You're all set! If you query the products table in Databend, you will see that the data from MySQL has been successfully synchronized. Feel free to perform insertions, updates, or deletions in MySQL, and you will observe the corresponding changes reflected in Databend as well.
0 commit comments