---
title: How to import data into a Data Warehouse for ClickHouse® deployment
description: This page explains how to import or transfer your existing data into a Scaleway Data Warehouse using ClickHouse®.
tags: clickhouse data-warehouse deployment import copy transfer migrate data federation
dates:
  validation: 2025-06-03
  posted: 2025-06-03
---
import Requirements from '@macros/iam/requirements.mdx'


Data federation allows you to query and combine data from multiple sources, enabling seamless analytics across different databases or storage systems without the need to move or duplicate data. 

Scaleway Data Warehouse for ClickHouse® allows you to quickly import any type of compatible data into [bottomless storage](/data-warehouse/concepts/#bottomless-storage) with minimal configuration.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization

- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)

## How to import data using the ClickHouse® CLI

### Connecting to the ClickHouse® CLI

1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.

2. Click the name of the Data Warehouse deployment you want to connect to. The overview tab of the deployment displays.

3. Click **Connect** next to **Frameworks** in the **Connect to your deployment** section. The connection wizard displays. 

4. Select **Protocols**, then copy the command in the **ClickHouse® CLI** tab.

5. In a terminal, paste and execute the copied command to connect to your deployment. Make sure to replace the placeholders with the corresponding values.

    ```bash
    clickhouse client \
    --host <YOUR_DEPLOYMENT_URL> \
    --port 9440 \
    --secure \
    --user scwadmin \
    --password '<YOUR_DEPLOYMENT_PASSWORD>'
    ```

6. You are now connected to your deployments using the ClickHouse® CLI, you can now import data.

<Message type="tip">
You can connect to your deployment using the ClickHouse® HTTP console directly from the **Overview** tab.
</Message>

### Importing data into your deployment from an Object Storage bucket

There are several ways to import data into your Data Warehouse for ClickHouse® deployment, depending on how your data is stored. One of the most common ways is to import it from an Object Storage bucket in any format supported by ClickHouse®.

<Tabs>
<TabsTab label="s3 table function">
The `s3` table function reads data directly from an Object Storage bucket by specifying the URL of the bucket, the file format, and the data structure.
```sql
INSERT INTO your_table
SELECT *
FROM s3('https://my-bucket.s3.scaleway.com/data/my_data.csv', 'CSV', 'column1 String, column2 Int32')
```
</TabsTab>
<TabsTab label="s3 storage engine">
The `s3` Storage Engine creates a table that points to a data table stored in an Object Storage bucket, then inserts data from the bucket table into the target table in your Data Warehouse for ClickHouse® deployment.
```sql
    CREATE TABLE your_table_s3
    ENGINE = S3('https://my-bucket.s3.scaleway.com/data/my_data.csv', 'CSV', 'column1 String, column2 Int32')
    ```
</TabsTab>
<TabsTab label="ClickHouse® Client">
The `clickhouse-client` executes an INSERT query to populate a table in your deployment by specifying the URL of the source Object Storage bucket and the file format.
  ```bash
  clickhouse-client --query="INSERT INTO your_table FORMAT CSVWithNames" \
  --url "https://my-bucket.s3.scaleway.com/data/my_data.csv" \
  --input_format_with_names=1
  ```
</TabsTab>
</Tabs>

