title: “Doris” weight: 3 type: docs aliases:

  • /ecosystem/doris.html

Doris

This documentation is a guide for using Paimon in Doris.

More details can be found in Apache Doris Website

Version

Paimon currently supports Apache Doris 2.0.6 and above.

Create Paimon Catalog

Use CREATE CATALOG statement in Apache Doris to create Paimon Catalog.

Doris support multi types of Paimon Catalogs. Here are some examples:

-- HDFS based Paimon Catalog
CREATE CATALOG `paimon_hdfs` PROPERTIES (
    "type" = "paimon",
    "warehouse" = "hdfs://172.21.0.1:8020/user/paimon",
    "hadoop.username" = "hadoop"
);

-- Aliyun OSS based Paimon Catalog
CREATE CATALOG `paimon_oss` PROPERTIES (
    "type" = "paimon",
    "warehouse" = "oss://paimon-bucket/paimonoss",
    "oss.endpoint" = "oss-cn-beijing.aliyuncs.com",
    "oss.access_key" = "ak",
    "oss.secret_key" = "sk"
);

-- Hive Metastore based Paimon Catalog
CREATE CATALOG `paimon_hms` PROPERTIES (
    "type" = "paimon",
    "paimon.catalog.type" = "hms",
    "warehouse" = "hdfs://172.21.0.1:8020/user/zhangdong/paimon2",
    "hive.metastore.uris" = "thrift://172.21.0.44:7004",
    "hadoop.username" = "hadoop"
);

-- Integrate with Aliyun DLF
CREATE CATALOG paimon_dlf PROPERTIES (
    'type' = 'paimon',
    'paimon.catalog.type' = 'dlf',
    'warehouse' = 'oss://paimon-bucket/paimonoss/',
    'dlf.proxy.mode' = 'DLF_ONLY',
    'dlf.uid' = 'xxxxx',
    'dlf.region' = 'cn-beijing',
    'dlf.access_key' = 'ak',
    'dlf.secret_key' = 'sk'
);

See Apache Doris Website for more examples.

Access Paimon Catalog

  1. Query Paimon table with full qualified name

    SELECT * FROM paimon_hdfs.paimon_db.paimon_table;
    
  2. Switch to Paimon Catalog and query

    SWITCH paimon_hdfs;
    USE paimon_db;
    SELECT * FROM paimon_table;
    

Query Optimization

  • Read optimized for Primary Key Table

    Doris can utilize the Read optimized feature for Primary Key Table(release in Paimon 0.6), by reading base data files using native Parquet/ORC reader and delta file using JNI.

  • Deletion Vectors

    Doris(2.1.4+) natively supports Deletion Vectors(released in Paimon 0.8).

Doris to Paimon type mapping