Skip to main content

Iceberg JDBC Catalog

This document describes the supported parameters when connecting to and accessing Iceberg Catalog metadata services using the JDBC interface through the CREATE CATALOG statement.

Note

This is an experimental feature, supported since version 4.1.0.

Parameter Overview

Property NameDescriptionDefault ValueRequired
iceberg.jdbc.uriSpecifies the JDBC connection URI-Yes
iceberg.jdbc.userJDBC connection username-Yes
iceberg.jdbc.passwordJDBC connection password-Yes
warehouseSpecifies the iceberg warehouse-Yes
iceberg.jdbc.init-catalog-tablesWhether to automatically initialize Catalog-related table structures on first usetrueNo
iceberg.jdbc.schema-versionSchema version used by JDBC Catalog, supports V0 and V1V0No
iceberg.jdbc.strict-modeWhether to enable strict mode, which performs stricter validation of metadatafalseNo
iceberg.jdbc.driver_classJDBC driver class name, such as org.postgresql.Driver, com.mysql.cj.jdbc.Driver, etc.-No
iceberg.jdbc.driver_urlPath to JDBC driver JAR file-No

Note:

  1. Iceberg JDBC Catalog supports various relational databases as backend storage, including PostgreSQL, MySQL, SQLite, etc.

  2. Ensure the JDBC driver JAR file is accessible. You can specify the driver location via iceberg.jdbc.driver_url.

Example Configurations

PostgreSQL as Metadata Storage

Using PostgreSQL database to store Iceberg metadata:

CREATE CATALOG iceberg_jdbc_postgresql PROPERTIES (
'type' = 'iceberg',
'iceberg.catalog.type' = 'jdbc',
'iceberg.jdbc.uri' = 'jdbc:postgresql://127.0.0.1:5432/iceberg_db',
'iceberg.jdbc.user' = 'iceberg_user',
'iceberg.jdbc.password' = 'password',
'iceberg.jdbc.init-catalog-tables' = 'true',
'iceberg.jdbc.schema-version' = 'V1',
'iceberg.jdbc.driver_class' = 'org.postgresql.Driver',
'iceberg.jdbc.driver_url' = '<jdbc_driver_jar>',
'warehouse' = 's3://bucket/warehouse',
's3.access_key' = '<ak>',
's3.secret_key' = '<sk>',
's3.endpoint' = 'https://s3.us-east-1.amazonaws.com',
's3.region' = 'us-east-1'
);

MySQL as Metadata Storage

Using MySQL database to store Iceberg metadata:

CREATE CATALOG iceberg_jdbc_mysql PROPERTIES (
'type' = 'iceberg',
'iceberg.catalog.type' = 'jdbc',
'iceberg.jdbc.uri' = 'jdbc:mysql://127.0.0.1:3306/iceberg_db',
'iceberg.jdbc.user' = 'iceberg_user',
'iceberg.jdbc.password' = 'password',
'iceberg.jdbc.init-catalog-tables' = 'true',
'iceberg.jdbc.schema-version' = 'V1',
'iceberg.jdbc.driver_class' = 'com.mysql.cj.jdbc.Driver',
'iceberg.jdbc.driver_url' = '<jdbc_driver_jar>'
'warehouse' = 's3://bucket/warehouse',
's3.access_key' = '<ak>',
's3.secret_key' = '<sk>',
's3.endpoint' = 'https://s3.us-east-1.amazonaws.com',
's3.region' = 'us-east-1'
);

SQLite as Metadata Storage

Using SQLite database to store Iceberg metadata (suitable for testing environments):

CREATE CATALOG iceberg_jdbc_sqlite PROPERTIES (
'type' = 'iceberg',
'iceberg.catalog.type' = 'jdbc',
'iceberg.jdbc.uri' = 'jdbc:sqlite:/tmp/iceberg_catalog.db',
'iceberg.jdbc.init-catalog-tables' = 'true',
'iceberg.jdbc.schema-version' = 'V1',
'iceberg.jdbc.driver_class' = 'org.sqlite.JDBC',
'iceberg.jdbc.driver_url' = '<jdbc_driver_jar>'
'warehouse' = 's3://bucket/warehouse',
's3.access_key' = '<ak>',
's3.secret_key' = '<sk>',
's3.endpoint' = 'https://s3.us-east-1.amazonaws.com',
's3.region' = 'us-east-1'
);