This topic describes how to add a ClickHouse data source in DataV and how to configure related parameters.
Prerequisites
The ClickHouse data source that you want to add is prepared.
Procedure for adding a data source over an internal network
Log on to the DataV console .
On the My Data tab, click Data Source and click Add Data.
From the Type list, select ClickHouse.
Select Internal Network from the drop-down list and select the region where the ClickHouse instance resides.
Enter database information.
Parameter
Description
Name
The name of the data source. Enter a custom name.
VPC ID
The ID of the VPC where your ClickHouse instance resides. Log on to the ApsaraDB ClickHouse console. In the Cluster List > Basic Information section, click Network Type.
The ID of the instance deployed in the VPC
The ID of the database instance in the VPC. You can obtain the ID on the Basic Information page in the ApsaraDB ClickHouse console.
NoteGenerally, you can view the VPC ID of a database instance in the console of a database product. However, due to the VPC network implementation mechanism, sometimes the instance ID displayed in the console is not the instance ID required to configure the VPC network for the DataV data source. You can call the API operation of a database service to obtain the ID of the VPC that is required by DataV. In most cases, the ID is the VPCCloudInstanceId or VPCInstanceId in the details of the database instance.
Domain Name
The domain name or IP address that is used to connect to the database.
ImportantThe endpoint is the domain name or IP address that the DataV server can use to access your database over the Internet or an internal network in some Alibaba Cloud regions.
For example, if you use an ApsaraDB for ClickHouse instance over an internal network, the domain name is rm-bpxxxxxxxxx33150.clickhouse.aliyuncs.com. You can obtain the domain name on the Basic Information page of the ApsaraDB for ClickHouse instance in the ApsaraDB ClickHouse console.
Ports
The port set for the database. Default value: 8123.
Username
The username that is used to connect to the database.
Password
The password that is used to connect to the database.
Database type
The name of the database. Select the desired database.
After you enter the database information, DataV automatically tests whether the database can be connected.
ImportantIf an error message Access VPC instance fail appears when you test the connection to the database, you can add the -1 suffix to the instance ID and try to test the connection to the database again.
After the database passes the connectivity test, click OK.
The added data source is displayed in the data source list.
Procedure for adding a data source over the Internet
Log on to the DataV console .
On the My Data tab, click Data Sources and click Add Data.
From the Type list, select ClickHouse.
Set Network to Internet and enter the database information.
Parameter
Description
Name
The name of the data source. Enter a custom name.
Network
The network type of the data source.
Domain Name
The domain name or IP address that is used to connect to the database.
ImportantThe endpoint is the domain name or IP address that the DataV server can use to access your database over the Internet or an internal network in some Alibaba Cloud regions.
Ports
The port that is used to connect to the database.
Username
The username that is used to connect to the database.
Password
The password that is used to connect to the database.
Database type
Click Get Data List. The system automatically obtains all data in the selected database.
After you enter the database information, DataV automatically tests whether the database can be connected.
ImportantIf an error message appears when you test the database connection, you can add-mysql,-instance, or-controller suffix to the instance ID Access VPC instance fail and try to test the connection to the database again.
After the database passes the connectivity test, click OK.
The added data source is displayed in the data source list.