Client

This document introduces the initialization and usage of ClickZettaClient. ClickZettaClient is a client used to record Lakehouse connection information and can be used to create RowStream and create JDBC connections.

ClickZettaClient Initialization

ClickZettaClient supports connection via JDBC URL or parameters. Below are examples of the two initialization methods:

Connect Client via JDBC URL

ClickZettaClient client = ClickZettaClient.newBuilder()
    .url("jdbc:clickzetta://instanceName.service/{0}?schema={1}&username={2}&password={3}&virtualcluster={4}")
    .build();

Connect Client via Parameters

ClickZettaClient client = ClickZettaClient.newBuilder()
    .instance("instanceName")
    .service("service")
    .username("username")
    .password("password")
    .vcluster("cluster")
    .schema("schema")
    .build();
ParameterRequiredDescription
usernameYUsername
passwordYPassword
serviceYAddress to connect to the lakehouse, region.api.singdata.com. You can see the JDBC connection string in Lakehouse Studio Management -> Workspace
instanceYCan be seen in Lakehouse Studio management -> workspace to view the JDBC connection string
workspaceYWorkspace in use
vclusterYVC in use
schemaYName of the schema being accessed

Close Client Connection

After using the client, be sure to explicitly call the close() method to release resources.

clinet.close();