Clickzetta Lakehouse Command Line Client User Guide
This document aims to help you understand how to install, configure, and use the Clickzetta Lakehouse command line client. Through this guide, you will be able to smoothly connect to the Clickzetta Lakehouse service instance and execute various SQL commands.
Prerequisites
Before using the client, please ensure the following conditions are met:
- Your device has Java 8 or a higher version installed.
- You have registered an account on the Clickzetta official website 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 Clickzetta Lakehouse command line client is developed based on the open-source SQL Line project. Please follow the steps below to install and configure the client:
- Download the client installation package sqlline_cz.tar.gz from the public network or obtain it from Clickzetta staff.
- Unzip the installation package file, and you will get the executable file and configuration file of the client tool.
Initialize Connection Environment
- Enter the working directory:
- Initialize Connection Environment: The main purpose is to download the latest jdbc package and place it in the sqlline_cz directory. You can also download the latest jdbc package from the links below and place it in the sqlline_cz directory.
Configure Client Connection
Method 1: Specify Connection Parameters via Command Line
Command parameters for connecting via specified method:
JDBC URL format:
Parameter Description:
<user_name>
: The username of the workspace member in the target workspace.<password>
: The password of the workspace member in the target workspace.schema
: The schema to be linked must be specified.virtualCluster
: The computing resources to be used must be specified.
Example:
Method 2: Specify Configuration File via Command Line
The command line tool provides a configuration file template, which you can modify and then specify the configuration file in the command line to achieve service connection. The sample configuration file format is as follows:
After modifying the template configuration file according to your service information and saving it, connect to the service by specifying the configuration file name through command parameters.
Example:
Clickzetta Lakehouse command line tool can create multiple different service connection configuration files at once. During use, you can quickly switch between service connections corresponding to different configuration files using the !properties
command. The following example demonstrates switching from the configuration file test.properties to test.properties.1:
Running SQL Commands
After a successful connection, you can execute Lakehouse SQL commands in the command line client. Here are some examples of SQL commands:
Switch the vcluter and schema to use
View the tables in the current schema
Exit Client
Notes
By setting the following environment variables in the current environment, you can enable debug mode, output log files, and facilitate troubleshooting.