Skip to main content

Posts

Showing posts from 2023

Trino Fest Keynote: Trino for lakehouses, data oceans, and beyond

6月14, 15日に開催された Trino Fest のキーノートTrino for lakehouses, data oceans, and beyondを見たので日本語訳サマリーです。動画は以下のリンクで見ることができます。 By the numbers 2022年11月から16回リリースされました 2023年に入ってからのコミット数は約2,250 合計のコントリビュータ数は660人以上 Slackメンバーは現在9,900人以上 1,800社を超える2万人以上のコミュニティメンバー db-enginesランキング は96位から69位へ New maintainers 新しいメンテナが2人追加されました。AWSのJames Pettyと、StarburstのManfred Moserです🎉全体のメンテナのリストは https://trino.io/development/roles.html#maintainers に載っています。 Table function improvements 新たに以下のテーブル関数が追加されています。 exclude_columns SELECT文で特定のカラムだけ除いて結果を返却 sequence 指定された範囲の値を生成して返却。従来のスカラー関数は最大で10,000のエントリまでという制限がありましたがテーブル関数ではその制限は撤廃されています。 query/ raw_query リモートで実行するクエリを文字列として受け取って実行結果を返却します。queryテーブル関数はJDBC系のコネクタやBigQuery、Cassandra、MongoDB、raw_queryテーブル関数はElasticsearchコネクタでサポートされています。 procedure   SQL Server内のストアドプロシージャを実行 Fault-tolerant execution 性能の改善やストレージとしてHDFSも対象となりました。MongoDB, BigQuery, Redshift and Oracleコネクタへの対応が追加されました。 Schema evolution, (meta)data, and tools ALTER COLUMN … SET DATA TYPEが新しいシンタックスとして追加 ALTER TABLE …...

Migrate Hive tabes to Iceberg in Trino

Trino version 411 introduced 'migrate' procedure in Iceberg connector. This procedure coverts the existing Hive tables with ORC, Parquet & Avro format to Iceberg table. This article explains the details of the procedure. If you execute CREATE TABLE AS SELECT statement to convert Hive to Iceberg, I would recommend trying this procedure. The procedure will be much faster because it doesn't rewrite files.  The procedure accepts 3 arguments (schema_name, table_name and optional recursive_directory). The possible values for recursive_directory argument are true, false and fail. The default value is fail that throws an exception if the nested directory exists under the table or partition location.   CALL iceberg.system.migrate(schema_name => 'testdb', table_name => 'customer_orders', recursive_directory => 'true');  Let me explain the details of the implementation next.  Generate Iceberg schema object based on Hive table definition Iterate ove...