Connect Bytebase to RisingWave
Introduce how to integrate Bytebase with RisingWave for schema management.
Bytebase is a database DevOps tool that provides a streamlined way to manage schema changes, enforce best practices, and collaborate on database development. This guide explains how to integrate Bytebase with RisingWave to manage schema evolution in real-time data processing environments.
Prerequisites
Before you begin, ensure you have the following:
- A running instance of RisingWave (self-hosted or Cloud version).
- A Bytebase instance (self-hosted or Cloud version).
- Database user credentials with the necessary privileges in RisingWave.
Step 1: Set up RisingWave
Create a RisingWave cluster in RisingWave Cloud using the free plan. For more information, refer to the RisingWave Cloud documentation.
Step 2: Install and configure Bytebase
You can run Bytebase using Docker or use Bytebase Cloud:
Access Bytebase UI at http://localhost:8080
and set up an admin account.
Then, add RisingWave as a new database:
- Go to Instances > Add Instance.
- Select RisingWave as the Instance type (since RisingWave is supported by Bytebase).
- Enter the following connection details:
- Instance Name: Any random name
- Environment:
Test
- Host or Socket:
localhost
or RisingWave Cloud’s instance host - Port:
4566
- Username:
bytebase
(the super user that you created) - Password: The password you set for the
bytebase
user
- Click Test Connection to verify, then click on Create at the end.
After creating the RisingWave instance, you will see the RisingWave databases under the Databases section as follows:
Step 3: Manage schema changes with Bytebase
Create a schema migration
-
In Bytebase, go to Projects and create a new project.
-
After creating the new project, click on it, then select Transfer DB and choose the RisingWave database named dev. This will transfer the database to the project.
-
Click on the new database instance to view all its details, the Schema Diagram, and open the SQL Editor.
-
Click on SQL Editor and use the following SQL script to create a table in RisingWave in Admin Mode:
Below is the SQL Editor of Bytebase:
Below is the result when querying the table in Bytebase’s SQL editor:
Track schema versions
Bytebase maintains a record of schema changes history, allowing you to:
- Track schema changes
- Roll back problematic migrations
- Enforce approval workflows for schema modifications
Step 4: Automate schema deployments
You can integrate Bytebase with CI/CD pipelines for automated schema deployments:
Use the Bytebase API
Bytebase provides gRPC and RESTful APIs, enabling full automation of database workflows. The UI console itself runs on this API, allowing seamless integration with your internal developer platform.
Key capabilities:
- SQL lint: Enforce SQL best practices.
- Database change deployment: Streamline schema changes.
- Embedded SQL Editor: Execute and validate queries.
GitOps integration
Bytebase supports GitOps workflows, allowing schema changes via pull requests. Connect your repository and configure automatic deployment rules.
Conclusion
By integrating Bytebase with RisingWave, you can efficiently manage schema changes, enforce best practices, and improve collaboration in real-time data streaming applications. This setup ensures schema consistency and reduces errors in production deployments.
For more information on leveraging Bytebase and its features, see Bytebase Documentation.
Was this page helpful?