Connect to ClickHouse
Please follow the steps below to connect to the ClickHouse data source.
Click on "New Data Connection" in the upper right corner of the Data Connection page.
Select the ClickHouse data source from the list of data source types.
Fill in the parameters for the data source as required.
- Name: The name of the connection, must be unique.
- Machine Address: The address of the database. If the url field is filled, the url will be prioritized.
- Port: The port of the database. If the url field is filled, the url will be prioritized.
- Username: The username of the database.
- Password: The password of the database.
- Database: The name of the database. If the url field is filled, the url will be prioritized.
- Maximum Connections: The maximum number of connections in the connection pool.
- Prioritize Database Comment for Dataset Title: Whether to display the table name or the table comment first. When enabled, the title is displayed; when disabled, the table comment is displayed.
- Data Gateway: Fill in the Data Gateway ID when the connection is made through a data gateway.
- URL: The JDBC URL of the database.
- Cluster: For output use only, output to the specified cluster. When this parameter is empty, only the local table with the MergeTree engine is written. When this parameter is filled, a distributed table is generated based on the local MergeTree table according to the cluster.
- ClickHouse Output Use Table Replica: For output use only, whether to use a table replica. If not using a replica, the table engine is MergeTree; if using a replica, the table engine is ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/{table}/{shard}', '{replica}') order by %s settings allow_nullable_key=1.
- ClickHouse Output Table Engine Template: The default is ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/{table}/{shard}', '{replica}') order by %s settings allow_nullable_key=1. Users can also rewrite it according to the format.
- join_use_nulls: The setting of join_use_nulls, can be 0 or 1, affecting the behavior of join.
- Hierarchical Loading of Schema and Tables: When closed, both schema and tables are loaded simultaneously. When enabled, schema and tables are loaded hierarchically, with only the schema being loaded during the connection process, allowing the data source to be quickly integrated into the system.
- Support Uploading Files to Specified Path: The specific path indicates the database name where the file is uploaded. This parameter can only be configured after verification.
- Support Operations on Connected Databases: Indicates that this connection can be selected as an output connection in Data Integration, Batch Sync, and Data Filling. Users need to ensure they have write permissions for the database. This parameter can only be configured after verification.
- Display Tables Only Under Specified Database/Schema: When this option is selected and the database field is not empty, only the tables under this database are displayed.
After filling in the parameters, click the "Verify" button to obtain the verification result (verifying the connectivity between HENGSHI SENSE and the configured data connection; adding is not allowed if the verification is not passed).
After verification is passed,
Support Data Integration Output
andSupport Uploading Files to Specified Path
will be enabled from disabled. You can choose whether to enable these two options.Click to execute the preset code, and the preset code corresponding to the data source will pop up. Click the execute button.
Click the "Add" button to add the configured ClickHouse connection.
Please note
- Parameters marked with * are required, while others are optional.
- When connecting to a data source, the preset code must be executed. Failure to do so will result in certain functions being unavailable during data analysis. Additionally, when upgrading from versions prior to 4.4 to 4.4, the preset code needs to be executed for existing data connections in the system.