Help Center/ DataArts Fabric/ Developer Guide/ Querying Data/ SQL on Iceberg/ Querying and Writing an Iceberg Table
Updated on 2025-08-25 GMT+08:00

Querying and Writing an Iceberg Table

Querying an Iceberg Table

You can query data in an Iceberg table. For specific syntax, refer to SELECT.

Note:

Only the latest complete data can currently be queried.

Example:

1
SELECT * FROM iceberg_ext order by col1;

Writing an Iceberg Table

You can add one or multiple rows of data to an Iceberg table. For specific syntax, refer to INSERT.

Notes:

  • Frequent insertion of small data may lead to small file issues. You are advised to periodically rewrite data/manifest files to maintain storage and query efficiency.
  • Currently, data files can only be written in Parquet format.

Example:

1
2
3
INSERT INTO iceberg_ext VALUES (1, 'a', 1.1234567, 100.11, '2025-03-03', '2025-03-03 16:00:00');
INSERT OVERWRITE INTO iceberg_ext VALUES (1, 'b', 1.1234567, 100.11, '2025-03-03', '2025-03-03 16:00:00');
INSERT INTO iceberg_ext (col1, col2, col3, col4, col5, col6) SELECT col1, col2, col3, col4, col5, col6 FROM iceberg_table WHERE col1 > 18;