Connect to Lakehouse Using the Command Line Client
This article describes how to install, configure, and use the sqlline-based Lakehouse command line client.
Prerequisites
Before using the client, ensure the following conditions are met:
- Your device has Java 8 or a higher version installed
- You have registered an account on the Singdata platform and created a Lakehouse service instance
- You have created a workspace for connection access
- The user identity using the client has been added to the workspace and authorized for access
Installing the Client
The Lakehouse command line client is a secondary development of the open-source SQL Line project. Follow these steps to install and configure the client:
- Download the client installation package sqlline_cz.tar.gz from the public network or obtain it from Singdata staff
- Unzip the installation package file to get the client tool's executable and configuration files:
Extracted contents:
Initialize Connection Environment
- Enter the working directory:
- Initialize the connection environment, downloading the latest JDBC driver:
If the setup script fails to download, manually download the JDBC driver and place it in the sqlline_cz directory:
Configure Client Connection
Method 1: Specify Connection Parameters via Command Line
JDBC URL format:
Parameter descriptions:
| Parameter | Description |
|---|---|
-d | JDBC driver class name, fixed as com.clickzetta.client.jdbc.ClickZettaDriver |
-u | JDBC connection URL, see JDBC Driver for full format |
-n | Workspace member username |
-p | Workspace member password |
schema | Specifies the Schema to connect to, required |
vcluster | Virtual Cluster to use, required |
Example:
Method 2: Specify Configuration File via Command Line
- Modify the configuration file template
example.properties:
- Connect using the configuration file:
After connecting, use the !properties command to quickly switch to another configuration file within the session:
Running SQL Commands
After a successful connection, you can execute Lakehouse SQL commands in the command line client:
Exit Client
Enable Debug Logging
Enable debug mode by setting an environment variable to output log files for troubleshooting:
Related Documents
- Connect using the cz-cli command line tool β Recommended alternative
- JDBC Driver Connection β Full JDBC URL format and parameters
- Connect to Lakehouse Tutorial β Comparison of all connection methods
