{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Reading and Writing Iceberg Tables from Data Workbench","description":"Learn how to read and write Iceberg tables using the Trino query engine in Data Workbench.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"reading-and-writing-iceberg-tables-from-data-workbench","__idx":0},"children":["Reading and Writing Iceberg Tables from Data Workbench"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This feature is not enabled on accounts by default. Contact Technical Support or your Customer Success representative to enable it."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide explains how to read and write Iceberg tables using the Trino query engine in Data Workbench."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Workbench provides access to an Iceberg catalog alongside the standard Data Workbench catalog. Iceberg tables written through Data Workbench are stored in Apache Iceberg format, enabling seamless integration with external Cloud Data Warehouses (e.g., Databricks, Snowflake) via zero-copy access."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Key characteristics:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Iceberg tables are accessed using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg"]}," catalog in Trino"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Only the Trino engine supports reading and writing Iceberg tables (Hive is not supported)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Data is stored in Apache Parquet format (Iceberg table format Version 2)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Iceberg catalog permissions"]}," granted by an admin user (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/composable-publish/permission-management"},"children":["Database-Level Access Control for Iceberg Catalog"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Familiarity with running Trino queries in Data Workbench (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/queries/trino/quickstart"},"children":["Data Workbench Trino Quickstart"]},")"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-naming-convention","__idx":3},"children":["Table Naming Convention"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Iceberg tables use a three-part fully-qualified name:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"iceberg.<database>.<table>\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Component"},"children":["Component"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Catalog"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td{account_id}_{site}_export"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td10000_us01_export"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User-defined table name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_table"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example fully-qualified table name:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg.td10000_us01_export.my_table"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-sql-commands","__idx":4},"children":["Supported SQL Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For detailed syntax, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://trino.io/docs/423/sql.html"},"children":["Trino SQL Statement Syntax"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://trino.io/docs/423/connector/iceberg.html#sql-support"},"children":["Trino Iceberg Connector SQL Support"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Commands not listed here are not guaranteed to work and may be unsupported or behave unexpectedly."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ddl-data-definition-language","__idx":5},"children":["DDL (Data Definition Language)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required Permission"},"children":["Required Permission"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE TABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a new table with column definitions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE TABLE AS SELECT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a table from query results"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALTER TABLE SET PROPERTIES"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Modify table properties (e.g., partitioning)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALTER TABLE EXECUTE optimize"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compact data files for better query performance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DROP TABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delete a table and its data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COMMENT ON TABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add a comment to a table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COMMENT ON COLUMN"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add a comment to a column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"dml-data-manipulation-language","__idx":6},"children":["DML (Data Manipulation Language)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required Permission"},"children":["Required Permission"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSERT INTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Insert rows into a table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UPDATE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Update existing rows (see warning below)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delete rows matching a condition (see warning below)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MERGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Upsert rows (insert or update based on condition, see warning below)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Warning: DELETE/UPDATE/MERGE and Databricks Compatibility"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Trino writes row-level deletes using Iceberg v2 position delete files, which Databricks does not support. After running ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UPDATE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MERGE"]}," operations, you must run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALTER TABLE EXECUTE optimize"]}," to rewrite the affected data files. Until optimization is performed, the table may not be readable from Databricks."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"query","__idx":7},"children":["Query"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required Permission"},"children":["Required Permission"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SELECT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query data with filtering, aggregation, joins, etc."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXPLAIN"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show query execution plan"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXPLAIN ANALYZE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show query plan with execution statistics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"metadata","__idx":8},"children":["Metadata"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required Permission"},"children":["Required Permission"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SHOW SCHEMAS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List available databases"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SHOW TABLES"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List tables in a database"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SHOW COLUMNS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List columns of a table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SHOW CREATE TABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show the CREATE TABLE statement"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESCRIBE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show table schema"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["READ"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WRITE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ANALYZE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compute table statistics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FULL"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"information-schema","__idx":9},"children":["Information Schema"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can query ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["information_schema"]}," to discover databases, tables, and columns programmatically."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Table"},"children":["Table"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg.information_schema.schemata"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List all accessible databases"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg.information_schema.tables"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List all accessible tables"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iceberg.information_schema.columns"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List columns of all accessible tables"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only resources belonging to your own account are visible."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"unsupported-commands","__idx":10},"children":["Unsupported Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reason"},"children":["Reason"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE SCHEMA"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database creation is managed by TD"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DROP SCHEMA"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database deletion is managed by TD"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRUNCATE TABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not supported by the Iceberg connector"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE VIEW"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not supported"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE MATERIALIZED VIEW"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not supported"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":11},"children":["Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"writing-iceberg-tables","__idx":12},"children":["Writing Iceberg Tables"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-a-table-by-copying-data-from-data-workbench","__idx":13},"children":["Create a Table by Copying Data from Data Workbench"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATE TABLE AS SELECT"]}," (CTAS) to copy data from a Data Workbench table into an Iceberg table:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"CREATE TABLE iceberg.td10000_us01_export.customer_segments\nAS\nSELECT * FROM my_database.customer_segments;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-an-empty-table","__idx":14},"children":["Create an Empty Table"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"CREATE TABLE iceberg.td10000_us01_export.events (\n    event_id VARCHAR,\n    user_id BIGINT,\n    event_type VARCHAR,\n    event_time TIMESTAMP(6) WITH TIME ZONE\n)\nWITH (\n    partitioning = ARRAY['day(event_time)']\n);\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"insert-data","__idx":15},"children":["Insert Data"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"INSERT INTO iceberg.td10000_us01_export.events\nSELECT event_id, user_id, event_type, event_time\nFROM my_database.raw_events\nWHERE td_interval(time, '-1d');\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reading-iceberg-tables","__idx":16},"children":["Reading Iceberg Tables"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-a-table","__idx":17},"children":["Query a Table"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT * FROM iceberg.td10000_us01_export.customer_segments\nLIMIT 100;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"list-tables-in-a-database","__idx":18},"children":["List Tables in a Database"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SHOW TABLES FROM iceberg.td10000_us01_export;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"view-table-schema","__idx":19},"children":["View Table Schema"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"DESCRIBE iceberg.td10000_us01_export.customer_segments;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"restrictions","__idx":20},"children":["Restrictions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"restricted-table-properties","__idx":21},"children":["Restricted Table Properties"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table properties cannot be specified by users:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reason"},"children":["Reason"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["location"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data location is automatically assigned per account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always Parquet; cannot be changed"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"unsupported-features","__idx":22},"children":["Unsupported Features"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following Trino Iceberg features are not supported in Data Workbench:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Views and materialized views"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["System procedures"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"engine-limitation","__idx":23},"children":["Engine Limitation"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Only the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Trino"]}," engine can read and write Iceberg tables"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Hive engine does not support Iceberg table operations"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-format","__idx":24},"children":["Data Format"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Only Apache Parquet is supported as the underlying data format"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"quotas","__idx":25},"children":["Quotas"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resource"},"children":["Resource"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Limit"},"children":["Limit"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tables per database"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200,000"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"further-reference","__idx":26},"children":["Further Reference"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://trino.io/docs/423/sql.html"},"children":["Trino SQL Statement Syntax"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://trino.io/docs/423/connector/iceberg.html#sql-support"},"children":["Trino Iceberg Connector SQL Support"]}]}]}]},"headings":[{"value":"Reading and Writing Iceberg Tables from Data Workbench","id":"reading-and-writing-iceberg-tables-from-data-workbench","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Table Naming Convention","id":"table-naming-convention","depth":2},{"value":"Supported SQL Commands","id":"supported-sql-commands","depth":2},{"value":"DDL (Data Definition Language)","id":"ddl-data-definition-language","depth":3},{"value":"DML (Data Manipulation Language)","id":"dml-data-manipulation-language","depth":3},{"value":"Query","id":"query","depth":3},{"value":"Metadata","id":"metadata","depth":3},{"value":"Information Schema","id":"information-schema","depth":3},{"value":"Unsupported Commands","id":"unsupported-commands","depth":3},{"value":"Examples","id":"examples","depth":2},{"value":"Writing Iceberg Tables","id":"writing-iceberg-tables","depth":3},{"value":"Create a Table by Copying Data from Data Workbench","id":"create-a-table-by-copying-data-from-data-workbench","depth":4},{"value":"Create an Empty Table","id":"create-an-empty-table","depth":4},{"value":"Insert Data","id":"insert-data","depth":4},{"value":"Reading Iceberg Tables","id":"reading-iceberg-tables","depth":3},{"value":"Query a Table","id":"query-a-table","depth":4},{"value":"List Tables in a Database","id":"list-tables-in-a-database","depth":4},{"value":"View Table Schema","id":"view-table-schema","depth":4},{"value":"Restrictions","id":"restrictions","depth":2},{"value":"Restricted Table Properties","id":"restricted-table-properties","depth":3},{"value":"Unsupported Features","id":"unsupported-features","depth":3},{"value":"Engine Limitation","id":"engine-limitation","depth":3},{"value":"Data Format","id":"data-format","depth":3},{"value":"Quotas","id":"quotas","depth":3},{"value":"Further Reference","id":"further-reference","depth":2}],"frontmatter":{"seo":{"title":"Reading and Writing Iceberg Tables from Data Workbench","description":"Learn how to read and write Iceberg tables using the Trino query engine in Data Workbench."}},"lastModified":"2026-06-25T01:37:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/composable-publish/iceberg-tables-data-workbench","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}