Nessie catalog

```
USE demo;

SHOW TABLES;
```

If your setup includes sample data (such as the taxi dataset), you should see tables like:

```
┌─name──────────┐
│ default.taxis │
└───────────────┘
```

Note

If you don't see any tables, this usually means:

1. The environment hasn't created the sample tables yet
2. The Nessie catalog service isn't fully initialized
3. The sample data loading process hasn't completed

You can check the Nessie logs to see the catalog activity:

```
docker-compose logs nessie
```

To query a table (if available):

```
SELECT count(*) FROM `default.taxis`;
```

```
┌─count()─┐
│ 2171187 │
└─────────┘
```

Backticks required

Backticks are required because ClickHouse doesn't support more than one namespace.

To inspect the table DDL:

```
SHOW CREATE TABLE `default.taxis`;
```

```
┌─statement─────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE demo.`default.taxis`                                                             │
│ (                                                                                             │
│     `VendorID` Nullable(Int64),                                                               │
│     `tpep_pickup_datetime` Nullable(DateTime64(6)),                                           │
│     `tpep_dropoff_datetime` Nullable(DateTime64(6)),                                          │
│     `passenger_count` Nullable(Float64),                                                      │
│     `trip_distance` Nullable(Float64),                                                        │
│     `RatecodeID` Nullable(Float64),                                                           │
│     `store_and_fwd_flag` Nullable(String),                                                    │
│     `PULocationID` Nullable(Int64),                                                           │
│     `DOLocationID` Nullable(Int64),                                                           │
│     `payment_type` Nullable(Int64),                                                           │
│     `fare_amount` Nullable(Float64),                                                          │
│     `extra` Nullable(Float64),                                                                │
│     `mta_tax` Nullable(Float64),                                                              │
│     `tip_amount` Nullable(Float64),                                                           │
│     `tolls_amount` Nullable(Float64),                                                         │
│     `improvement_surcharge` Nullable(Float64),                                                │
│     `total_amount` Nullable(Float64),                                                         │
│     `congestion_surcharge` Nullable(Float64),                                                 │
│     `airport_fee` Nullable(Float64)                                                           │
│ )                                                                                             │
│ ENGINE = Iceberg('http://localhost:9002/my-bucket/default/taxis/', 'admin', '[HIDDEN]')      │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
```

## Loading data from your Data Lake into ClickHouse[​](#loading-data-from-your-data-lake-into-clickhouse "Direct link to Loading data from your Data Lake into ClickHouse")

If you need to load data from the Nessie catalog into ClickHouse, start by creating a local ClickHouse table:

```
CREATE TABLE taxis
(
    `VendorID` Int64,
    `tpep_pickup_datetime` DateTime64(6),
    `tpep_dropoff_datetime` DateTime64(6),
    `passenger_count` Float64,
    `trip_distance` Float64,
    `RatecodeID` Float64,
    `store_and_fwd_flag` String,
    `PULocationID` Int64,
    `DOLocationID` Int64,
    `payment_type` Int64,
    `fare_amount` Float64,
    `extra` Float64,
    `mta_tax` Float64,
    `tip_amount` Float64,
    `tolls_amount` Float64,
    `improvement_surcharge` Float64,
    `total_amount` Float64,
    `congestion_surcharge` Float64,
    `airport_fee` Float64
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(tpep_pickup_datetime)
ORDER BY (VendorID, tpep_pickup_datetime, PULocationID, DOLocationID);
```

Then load the data from your Nessie catalog table via an `INSERT INTO SELECT`:

```
INSERT INTO taxis 
SELECT * FROM demo.`default.taxis`;
```

- [Local Development Setup](#local-development-setup)
  - [Prerequisites](#local-prerequisites)- [Setting up Local Nessie Catalog](#setting-up-local-nessie-catalog)- [Connecting to Local Nessie Catalog](#connecting-to-local-nessie-catalog)- [Querying Nessie catalog tables using ClickHouse](#querying-nessie-catalog-tables-using-clickhouse)- [Loading data from your Data Lake into ClickHouse](#loading-data-from-your-data-lake-into-clickhouse)

Was this page helpful?