This section will explain how to connect to the cluster from your browser using WebSQL.
Step 1.1. Create a Managed ClickHouse® cluster
Warning
During the trial period, you can create clusters with up to 8 cores, 32 GB RAM, and 400 GB storage. If you need to raise the quotas, don't hesitate to contact our support.
Keep the Version as is - this is the latest stable version of ClickHouse®.
Under Networking → VPC, select the network where you want to create the cluster.
If you don’t need to place the cluster in a specific network, leave the preselected default option.
Click Submit.
When the cluster is ready to operate, its state in the console will change to Alive:
Tip
DoubleCloud creates the admin superuser and its password automatically.
You can the username and password under Credentials in the Overview tab on the cluster page.
Now it's time to set up the tools to get the data from a remote source and transfer it to your start_db ClickHouse® database. To accomplish this, you need to complete the following steps:
This is your data pipeline tool. It will connect your endpoints and ensure the integrity of the data.
Step 2.1. Create a source endpoint
In the list of services, select Transfer.
Click Create → Source endpoint.
In Source type, select Object storage.
Under Basic settings:
Enter the Name of the endpoint: s3-source-dev.
(optional) Enter a Description of the endpoint.
Move on to Endpoint parameters.
Under S3: Bucket connection configuration:
In Bucket name, enter doublecloud-docs.
Leave all other parameters in this block empty.
This bucket is public, and Transfer can connect to it using default parameters.
In Path pattern, enter data-sets/bookings.csv.
Under Data format:
Select CSV in the dropdown.
Under CSV → Delimiter, select Common.
In the dropdown, select Semicolon ; as the common delimiter.
Leave all other parameters in this block empty.
Under Dataset:
In Schema, enter {}. This tells Transfer to auto-infer the schema.
In Table, enter bookings.
(Optional). Test the source endpoint:
Click Test connection.
Select the runtime type you want Transfer to use for connecting to the database.
Dedicated:
Transfer connects to the database using a specified
internal or
external network.
Serverless:
Transfer connects to the database available from the internet using an automatically chosen network.
Runtime compatibility warning
Don't use endpoints with different runtime types
in the same transfer — this will cause the transfer to fail.
If you selected the dedicated runtime,
select the network in the dropdown.
Click Test connection.
Testing the connection may take a few minutes.
Click Submit. You'll see the following line on your Endpoints list:
The transmitter is ready to go. We need to create an endpoint to receive the data from a remote source.
Step 2.2. Create a target endpoint
In the list of services, select Transfer.
Click Create → Target endpoint.
In Target type, select ClickHouse.
Under Basic settings:
Enter the Name of the endpoint: clickhouse-target-dev
(optional) Enter a Description of the endpoint.
Move on to Endpoint parameters.
Under Connection settings:
In Connection type, select Managed cluster.
In Managed cluster, select clickhouse-dev in the dropdown.
In Authentication, select Default.
The endpoint will connect to the cluster as the admin user.
In Database, enter start_db.
This is the database where your data is transferred to.
This is what it should look like on your screen:
In Cleanup policy, select Drop.
Leave all the other fields blank or with their default values.
Click Submit. You'll see the following line on your Endpoints list:
Good work. Now we've created an endpoint that will receive and write the data to your ClickHouse® database. All we need now is a tool that will connect both endpoints and transfer the data.
Step 2.3. Create and activate a transfer
In the list of services, select Transfer.
Click Create transfer.
Under Endpoints:
From the Source dropdown menu, select s3-source-dev.
From Target, select clickhouse-target-dev .
Under Basic settings:
Enter the transfer Name: transfer-dev
(optional) Enter the transfer Description.
Under Transfer settings, select the Transfer type. In this use case, we choose Snapshot to make the transfer process as fast as possible.
This is what it should look like on your screen:
Leave all the other fields blank or with their default values.
Click Submit. You will see the following line in your Transfers tab:
After you've created a transfer, click
→ Activate.
Wait until your transfer status changes to Done.
Check the data transferred to your ClickHouse® database:
Open WebSQL.
Run the following command:
SELECT*FROM "start_db".bookings LIMIT 100
Nice work! You have all the data transferred from a remote source and replicated with complete integrity in your own ClickHouse® database.
Keep exploring
For more information on what you can do with DoubleCloud, see the links below and continue exploring!