CREATE CONNECTION command creates a reusable connection configuration that can be referenced when creating sources, sinks, or tables. Currently supported connection types are Kafka, Schema Registry, and Iceberg.
Added in v2.3.0: Support
iceberg connection.Syntax
Parameter
Click to see all supported properties for Kafka connection.
Click to see all supported properties for Kafka connection.
Required
properties.bootstrap.server: The Kafka bootstrap server addresses.
properties.security.protocolproperties.ssl.endpoint.identification.algorithmproperties.ssl.ca.locationproperties.ssl.ca.pemproperties.ssl.certificate.locationproperties.ssl.certificate.pemproperties.ssl.key.locationproperties.ssl.key.pemproperties.ssl.key.passwordproperties.sasl.mechanismproperties.sasl.usernameproperties.sasl.passwordproperties.sasl.kerberos.service.nameproperties.sasl.kerberos.keytabproperties.sasl.kerberos.principalproperties.sasl.kerberos.kinit.cmdproperties.sasl.kerberos.min.time.before.reloginproperties.sasl.oauthbearer.config
privatelink.targetsprivatelink.endpoint
aws.regionendpointaws.credentials.access_key_idaws.credentials.secret_access_keyaws.credentials.session_tokenaws.credentials.role.arnaws.credentials.role.external_id
Click to see all supported properties for Schema Registry.
Click to see all supported properties for Schema Registry.
Click to see all supported properties for Iceberg connection.
Click to see all supported properties for Iceberg connection.
In RisingWave Cloud, AWS credentials (
s3.access.key, s3.secret.key) are required and cannot be omitted. In self-hosted deployments, you may omit them to rely on the AWS SDK default credential chain (for example, EC2 instance profile or environment variables).Example
To connect to a schema registry:Create an AWS PrivateLink connection
If you are using a cloud-hosted source or sink, such as AWS MSK, there might be connectivity issues when your service is located in a different VPC from where you have deployed RisingWave. To establish a secure, direct connection between these two different VPCs and allow RisingWave to read consumer messages from the broker or send messages to the broker, use the AWS PrivateLink service. Follow the steps below to create an AWS PrivateLink connection.- Create a target group for each broker. Set the target type as IP addresses and the protocol as TCP. Ensure that the VPC of the target group is the same as your cloud-hosted source.
- Create a Network Load Balancer. Ensure that it is enabled in the same subnets your broker sources are in and the Cross-zone load balancing is also enabled.
- Create a TCP listener for each MSK broker that corresponds to the target groups created. Ensure the ports are unique.
- Complete the health check for each target group.
- Create a VPC endpoint service associated with the Network Load Balancer created. Be sure to add the AWS principal of the account that will access the endpoint service to allow the service consumer to connect. See Manage permissions for more details.
- Use the
CREATE CONNECTIONcommand in RisingWave to create an AWS PrivateLink connection referencing the endpoint service created. Here is an example of creating an AWS PrivateLink connection.
- Create a source or sink with AWS PrivateLink connection.
- Use the
CREATE SOURCE/TABLEcommand to create a Kafka source with PrivateLink connection. For more details, see Create source with AWS PrivateLink connection. - Use the
CREATE SINKcommand to create a Kafka sink with PrivateLink connection. For more details, see Create sink with AWS PrivateLink connection.
- Use the