Skip to main content
Skip to main content

Delta Lake Catalog

Delta Lake Catalog is compatible with the Trino Connector, using the Delta Lake Connector to access Delta Lake tables.

This feature is supported starting from Doris version 3.0.1.

Note

This is an experimental feature.

Instructions for Use​

  1. Before accessing Delta Lake tables with the Trino Catalog, you must first compile the Trino Delta Lake plugin and place it in the specified directory. Refer to the following steps for specific instructions.
  2. The current Doris is compatible with the Trino 435 version plugin. Using a Trino plugin lower or higher than version 435 may cause compatibility issues.
  3. Time Travel feature of Delta Lake is not supported at the moment.
  4. Querying Delta Lake history information is not supported at the moment.

Compiling the Delta Lake Connector Plugin​

JDK version 17 is required.

$ git clone https://github.com/apache/Doris-thirdparty.git
$ cd Doris-thirdparty
$ git checkout trino-435
$ cd plugin/trino-delta-lake
$ mvn clean install -DskipTest

After compiling, you will find the trino-delta-lake-435 directory under trino/plugin/trino-delta-lake/target/.

You can also directly download the precompiled trino-delta-lake-435-20240724.tar.gz and extract it.

Deploying the Delta Lake Connector​

Place the trino-delta-lake-435/ directory in the connectors/ directory of all FE and BE deployment paths. (If it does not exist, you can create it manually).

β”œβ”€β”€ bin
β”œβ”€β”€ conf
β”œβ”€β”€ connectors
β”‚ β”œβ”€β”€ trino-delta-lake-435
...

After deployment, it is recommended to restart the FE and BE nodes to ensure the Connector is correctly loaded.

Creating the Delta Lake Catalog​

create catalog delta_lake_catalog properties ( 
"type"="trino-connector",
"trino.connector.name"="delta_lake",
"trino.hive.metastore"="thrift",
"trino.hive.metastore.uri"= "thrift://ip:portrait ",
"trino.hive.config.resources"="/path/to/core-site.xml,/path/to/hdfs-site.xml"
);

Note: Properties prefixed with trino. are native Trino properties. For more information about Delta Lake properties, refer to the Trino documentation.

Column Type Mapping​

Delta LakeTrinoDoris
BOOLEANBOOLEANBOOLEAN
INTEGERINTEGERINT
BYTETINYINTTINYINT
SHORTSMALLINTSMALLINT
LONGBIGINTBIGINT
FLOATREALFLOAT
DOUBLEDOUBLEDOUBLE
DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
STRINGVARCHARSTRING
BINARYVARBINARYSTRING
DATEDATEDATE
TIMESTAMPNTZ (TIMESTAMP_NTZ)TIMESTAMP(6)DATETIME
TIMESTAMPTIMESTAMP(3) WITH TIME ZONEDATETIME
ARRAYARRAYARRAY
MAPMAPMAP
STRUCTROWSTRUCT