BigData / Apache Iceberg Interview questions
How do you create an Iceberg table?
Creating an Iceberg table typically means running a standard SQL CREATE TABLE statement through an Iceberg-aware engine like Spark or Trino, specifying the table's schema and, optionally, its initial partition spec using Iceberg's partition transforms.
CREATE TABLE catalog.db.events ( id BIGINT, event_time TIMESTAMP, user_id STRING, data STRING ) USING iceberg PARTITIONED BY (day(event_time));
The exact syntax varies slightly by engine (the USING iceberg clause above is Spark SQL's way of specifying the table format), but the underlying result is the same regardless of which engine issued the statement: a new table metadata file is written, an initial (typically empty) snapshot is created, and the catalog is updated to point at that new table, ready for engines to write actual data into.
Because table creation goes through the catalog, a table created via one engine (say, Spark) is immediately visible and usable by any other engine configured against the same catalog (say, Trino), without any additional registration step — the catalog is the single shared source of truth every compatible engine consults.
More Related questions...