Environment Preparation
Prepare Databend Cloud and Test Data
Firstly, visit Databend Cloud to initiate a Warehouse. Then, create databases and test tables within the worksheet.Prepare AutoMQ and Test Data
Refer to Deploy Multi-Nodes Cluster on Linux▸ to set up AutoMQ, making sure there’s network connectivity between AutoMQ and Databend. Quickly create a topic namedexample_topic
in AutoMQ and write test JSON data into it by following these steps.
Create Topic
Utilize Apache Kafka command-line tools to create a topic. Ensure you have access to the Kafka environment and that the Kafka service is running. Below is an example command for creating a topic:When executing commands, replace
topic
and bootstrap-server
with the actual Kafka server addresses.Generate Test Data
Generate test data in JSON format that corresponds to the previously mentioned table.Write Test Data
Use Kafka’s command-line tools or programming methods to write test data into a topic named example_topic. Here is an example using command-line tools:When executing the command, replace the topic and bootstrap-server with the actual Kafka server address being used.
Create a Bend-ingest-databend Job
bend-ingest-kafka is designed to monitor Kafka and batch write data into a Databend Table. After deployingbend-ingest-kafka
, the data import job can be initiated.
When executing the command, replace kafka-bootstrap-servers with the actual Kafka server address you are using.
Parameter Description
databend-dsn
The DSN provided by Databend Cloud for connecting to the warehouse can be found in this documentation.batch-size
bend-ingest-kafka
will gather data until it reaches the specified batch size, then initiate a data synchronization process.
Verify Data Import
Navigate to the Databend Cloud worksheet and query theautomq_db.users
table. You should confirm that the data has been successfully synchronized from AutoMQ to the Databend Table.
