Skip to main content

Delta Lake Catalog

Run catalog SQL with a warehouse SQL user that can manage catalogs and access the source. Ensure network access from the warehouse to metadata, storage, and source endpoints. For connector deployment, host files, JVM settings, or service configuration changes, contact VeloDB Cloud support.

Note:

This integration is experimental. Confirm connector availability and the required endpoint and credential configuration with VeloDB Cloud support before using these examples.

Overview​

Delta Lake Catalog uses the Trino Connector compatibility framework with Trino Delta Lake Connector to access Delta Lake tables.

Note:

  • This connector is experimental.
  • This feature does not depend on a Trino cluster environment, it only uses the Trino compatibility plugin.

Use cases​

ScenarioSupport Status
Data IntegrationRead Delta Lake data and write to warehouse tables
Data Write-backNot supported

Version compatibility​

  • Warehouse: Confirm connector availability with VeloDB Cloud support.
  • Trino Connector Version: 435
  • Delta Lake Version: For supported versions, please refer to Trino Documentation

Quick start​

1. prepare the managed connector​

Contact VeloDB Cloud support to confirm this experimental connector's availability, plugin version, source credentials, and network access for the warehouse. Plugin installation and service restarts are managed operations.

2. create a catalog​

Basic Configuration

CREATE CATALOG delta_lake_catalog PROPERTIES (
'type' = 'trino-connector',
'trino.connector.name' = 'delta_lake',
'trino.hive.metastore' = 'thrift',
'trino.hive.metastore.uri' = 'thrift://ip:port',
'trino.hive.config.resources' = '/path/to/core-site.xml,/path/to/hdfs-site.xml'
);

Configuration Description

  • trino.hive.metastore: Metadata service type, supports thrift (Hive Metastore), etc.
  • trino.hive.metastore.uri: Hive Metastore service address
  • trino.hive.config.resources: Hadoop configuration file path, multiple files separated by commas

For more configuration options, please refer to the "Configuration Description" section below or Trino Official Documentation.

3. query data​

After creating the Catalog, you can query Delta Lake table data using one of the following three methods:

-- Method 1: Switch to Catalog then query
SWITCH delta_lake_catalog;
USE delta_lake_db;
SELECT * FROM delta_lake_tbl LIMIT 10;

-- Method 2: Use two-level path
USE delta_lake_catalog.delta_lake_db;
SELECT * FROM delta_lake_tbl LIMIT 10;

-- Method 3: Use fully qualified name
SELECT * FROM delta_lake_catalog.delta_lake_db.delta_lake_tbl LIMIT 10;

Configuration description​

Catalog configuration parameters​

The basic syntax for creating a Delta Lake Catalog is as follows:

CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
'type' = 'trino-connector', -- Required, fixed value
'trino.connector.name' = 'delta_lake', -- Required, fixed value
{TrinoProperties}, -- Trino Connector related properties
{CommonProperties} -- Common properties
);

TrinoProperties parameters​

TrinoProperties are used to configure Trino Delta Lake Connector specific properties, these properties are prefixed with trino.. Common parameters include:

Parameter NameRequiredDefault ValueDescription
trino.hive.metastoreYes-Metadata service type, such as thrift
trino.hive.metastore.uriYes-Hive Metastore service address
trino.hive.config.resourcesNo-Hadoop configuration file path, multiple files separated by commas
trino.delta.hide-non-delta-tablesNofalseWhether to hide non-Delta Lake tables

For more Delta Lake Connector configuration parameters, please refer to Trino Official Documentation.

CommonProperties parameters​

CommonProperties are used to configure common Catalog properties, such as metadata refresh policies, permission control, etc. For detailed information, please refer to the "Common Properties" section in Catalog Overview.

Data type mapping​

When using Delta Lake Catalog, data types are mapped according to the following rules:

Delta Lake TypeTrino TypeVeloDB Cloud TypeNotes
booleanbooleanboolean
intintint
bytetinyinttinyint
shortsmallintsmallint
longbigintbigint
floatrealfloat
doubledoubledouble
decimal(P, S)decimal(P, S)decimal(P, S)
stringvarcharstring
binaryvarbinarystring
datedatedate
timestamp_ntztimestamp(N)datetime(min(N, 6))Fractional precision is capped at 6.
timestamptimestamp with time zone(N)datetime(min(N, 6))Fractional precision is capped at 6; this connector maps the value to DATETIME, not TIMESTAMPTZ.
arrayarrayarray
mapmapmap
structrowstruct