Configuring Interconnection Between ClickHouse and OBS
Using S3 Table Functions
- Log in to the active OMS node.
- Run the following command to obtain the data stored in OBS:
select * from S3(path, [ak, sk,] format, structure, [compression])
- path: Access domain name/OBS file path. Log in to OBS console and choose Parallel File Systems. On the page that is displayed, click the file system name. On the Files tab page, click the file name. The value of Link is the path.
Figure 1 File path
- ak: Optional. The AK that has the permission to access OBS.
- sk: Optional. The SK that has the permission to access OBS.
- format: The file format.
- structure: The table schema.
- compression: Optional. The compression type.
- path: Access domain name/OBS file path. Log in to OBS console and choose Parallel File Systems. On the page that is displayed, click the file system name. On the Files tab page, click the file name. The value of Link is the path.
Using the S3 Table Engine
- Log in to the active OMS node.
- Run the following commands to create a table:
CREATE TABLE test1_s3 ('name' String, 'age' int)
ENGINE = S3(path, [ak, sk,] format, [compression])
- Run the following command to query the table:
select * from test1_s3;
Modifying Manager Configurations
Parameter |
Value |
---|---|
s3.endpoint-name.endpoint |
The OBS bucket address. |
s3.endpoint-name.access_key_id |
The AK that is used to access OBS. |
s3.endpoint-name.secret_access_key |
The SK that is used to access OBS. |
Typically, the URL shared by OBS contains HTTPS. If the URL is inaccessible directly, perform the following operations to modify the configuration:
Parameter |
Value |
---|---|
openSSL.client.loadDefaultCAFile |
true |
openSSL.client.cacheSessions |
true |
openSSL.client.disableProtocols |
sslv2,sslv3 |
openSSL.client.preferServerCiphers |
true |
openSSL.client.invalidCertificateHandler.name |
AcceptCertificateHandler |
After the modification, click Save.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.