dariobottazzi / trino-minio-iceberg-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose up

Run Trino

./trino-cli-388-executable.jar --server http://localhost:8080

Hive

USE hive;

CREATE SCHEMA IF NOT EXISTS iris
    WITH (location = 's3a://iris/');

CREATE TABLE IF NOT EXISTS hive.iris.iris_parquet
(
    sepal_length DOUBLE,
    sepal_width  DOUBLE,
    petal_length DOUBLE,
    petal_width  DOUBLE,
    class        VARCHAR
)
WITH ( location = 's3a://iris/',
    format = 'PARQUET');

Iceberg

USE iceberg;

CREATE SCHEMA IF NOT EXISTS iris
    WITH (location = 's3a://iris/');

CREATE TABLE IF NOT EXISTS iceberg.iris.iris_parquet
(
    sepal_length DOUBLE,
    sepal_width  DOUBLE,
    petal_length DOUBLE,
    petal_width  DOUBLE,
    class        VARCHAR
)
WITH (format = 'PARQUET');

Load from Hive table.

insert into iceberg.iris.iris_empty_parquet (select * from hive.iris.iris_parquet);

About