Skip to main content

Kudu Catalog

Kudu Catalog is compatible with the Trino Connector framework, using the Kudu Connector to access Kudu tables.

This feature is supported starting from Doris version 3.0.1.

Note

This is an experimental feature.

Instructions for Use​

  1. Before accessing Kudu tables using the Trino Catalog, you must first compile the Trino Kudu plugin and place it in the specified directory. Refer to the following steps for detailed 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. Due to the Trino 435 version Kudu plugin not supporting the DATE type, it is recommended to use the Kudu plugin we provide.

Compiling the Kudu 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-kudu
$ mvn clean package -Dmaven.test.skip=true

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

You can also directly download our precompiled trino-kudu-435-20240724.tar.gz and extract it.

Deploying the Kudu Connector​

Place the trino-kudu-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-kudu-435
...

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

Creating the Kudu Catalog​

create catalog kudu_catalog properties (  
"type"="trino-connector",
"trino.connector.name"="kudu",
"trino.kudu.client.master-addresses"="ip1:port1,ip2:port2,ip3,port3",
"trino.kudu.authentication.type" = "NONE"
);

Note: Properties prefixed with trino. are native Trino properties. For more information on Kudu properties, refer to the Trino documentation.

Column Type Mapping​

KuduTrinoDorisDescription
BOOLEANBOOLEANBOOLEAN
INT8TINYINTTINYINT
INT16SMALLINTSMALLINT
INT32INTEGERINT
INT64BIGINTBIGINT
FLOATREALFLOAT
DOUBLEDOUBLEDOUBLE
BINARYVARBINARYSTRINGNeeds HEX(col) to display the same as Trino
STRINGVARCHARSTRING
DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
DATEDATEDATE
UNIXTIME_MICROSTIMESTAMP(3)DATETIME(3)
VARCHARUNSUPPORTED
UTF-8 encoded stringUNSUPPORTED