DataGrip is an integrated development environment (IDE) developed by JetBrains specifically for database developers and administrators. It supports various database management systems, provides intelligent code completion, and facilitates version control integration.
This article introduces how DataGrip connects to ByteHouse Cloud Data Warehouse Edition using the open-source ClickHouse driver.
ByteHouse supports connecting DataGrip via IAM users or database users. The differences between IAM users and database users are described as follows. You can choose according to your needs.
For more information about IAM users and database users, please refer to the following documents:
Launch DataGrip, click the + icon on the Database Explorer tab, and select Data Source -> ClickHouse.
warning
If the interface prompts you to download the driver, click "Download" to complete the driver download.
Configure the ByteHouse Data Source fields.
Parameter | Connect using IAM user | Connect using database user |
|---|---|---|
Name | Customize the connection name. | |
Host | Configure as the ByteHouse network domain name, which can be obtained in ByteHouse Console under Tenant management > basic information > network information. For details, see Step 2: Set network information. | |
Port | Database port number, set as the fixed value: 8123. | |
User & Password | Username and password for logging in to the ByteHouse database.
|
|
URL | The field format is as follows:
| The field format is as follows:
|
Switch to the SSH/SSL tab and check Use SSL.
Switch to the Schemas tab and select the database to connect (you can click the refresh button to refresh the list).
(Optional) Set the default virtual warehouse.
tip
To set the Default virtual warehouse used after connecting to ByteHouse when you have multiple virtual warehouses, refer to this Step. If you do not set it, the Default virtual warehouse set in the Console will be used after connecting to ByteHouse.
On the Advanced tab, set custom_settings to virtual_warehouse=your_virtualwarehouse_id.
Here, your_virtualwarehouse_id is the default virtual warehouse ID used after connecting to ByteHouse. You can view the corresponding virtual warehouse ID on the virtual warehouse page in the ByteHouse Console.
Click Test Connection. If Succeeded is displayed, the connection is successful.
tip
Due to potential differences in how third-party software recognizes special characters contained in the Password Field in the URL, if you have correctly configured the settings above but still cannot connect properly, try manually entering the password in the Password Field and test the connection again.
If you encounter the following error during the connection process:
[22000] Code: 0. DB::Exception: <Unreadable error message> (transport error: 500).
You can resolve this issue by adjusting the driver version of the ClickHouse datasource:
Set the driver version of the ClickHouse datasource to 0.6.3. On the Drivers tab, click ClickHouse, then on the right side under Driver Files click +, click Provided Driver, select ClickHouse, and choose version 0.6.3.
If you encounter the following error during the connection process:
LZ4 is not supported. Please disable compression(compress=0), modify the algorithm(e.g. compress_algorithm=gzip), or add the missing libraries to the classpath.
You can fix this problem by disabling the compress parameter:
Click the added ClickHouse data source under the Data Source tab, then click the Advanced tab on the right, and set the compress parameter to false.
If you encounter the following error during the connection process:
You can fix this problem by activating the ssl operation:
Click the added ClickHouse data source under the Data Source tab, then click the Advanced tab on the right, and set the ssl parameter to true.
For more details about DataGrip, visit the DataGrip official documentation.