Iceberg Tables
Using the External Table feature, the Open Table format Apache Iceberg can be accessed from Vector.
An existing Iceberg warehouse in some location (e.g., s3a://mybucket/mywarehouse) where a table userdata exists can be loaded as follows:
1. Create an external table and specify Iceberg details.
CREATE EXTERNAL TABLE iceberg_ex_test (
registration_dttm TIMESTAMP,
id INTEGER,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(50),
gender VARCHAR(50),
ip_address VARCHAR(50),
cc VARCHAR(50),
country VARCHAR(50),
birthdate VARCHAR(50),
salary DECIMAL(18,2),
title VARCHAR(50)
) USING SPARK WITH
REFERENCE='icebergdemo.db.userdata',
FORMAT='iceberg'
OPTIONS=('warehouse-path'='s3a://mybucket/mywarehouse');
2. Create native vector table.
CREATE EXTERNAL TABLE iceberg_ex_test (
registration_dttm TIMESTAMP,
id INTEGER,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(50),
gender VARCHAR(50),
ip_address VARCHAR(50),
cc VARCHAR(50),
country VARCHAR(50),
birthdate VARCHAR(50),
salary DECIMAL(18,2),
title VARCHAR(50)
) WITH STRUCTUREX100;
3. Load vector table with INSERT command.
INSERT INTO iceberg_test SELECT * FROM iceberg_ex_test
Note: Currently, Hadoop-Style catalogs are only supported.
Last modified date: 12/19/2024