Overview
What the Lakehouse is#
The Lakehouse combines the low cost and openness of files in object storage with the tables, transactions and SQL of a database.
- Tables are Apache Iceberg tables. Data is stored as Parquet files in an S3 bucket you own; Iceberg keeps the table's schema, partitioning and a history of snapshots, so every change is an atomic commit you can look back at.
- SQL is Spark SQL. Queries run on Apache Spark 4.0 with Iceberg 1.10, so you
get joins, window functions, common table expressions,
MERGE, and the Iceberg-specific statements for partitioning, schema changes and time travel. - Compute is yours while you need it. A session starts a dedicated engine sized by the compute you pick and the minimum number of workers; you stop it when you are done.
- Access is governed. Permissions on warehouses, databases and tables, row filters, column masks and an audit log of every statement apply to everything you run.
Warehouses, databases and tables#
| Term | Meaning |
|---|---|
| Warehouse | An S3 bucket registered with Groundzero. A warehouse is one Iceberg catalog, and its name is the catalog name. |
| Database | A grouping of tables inside a warehouse, also called a schema. Write it before the table name. |
| Table | An Iceberg table. Always refer to it as database.table. |
| Session | A running SQL engine for one warehouse, with the compute size and workers you chose. SQL does not run until a session is started. |
| Compute | A size (memory and vCPU) chosen from the list your site offers. |
| Minimum workers | How many workers the session starts with. It scales up from there as the load grows. |
The system database audit records every statement that runs in the warehouse.
Administrators can query it (see Audit logs in the How-to guides).
Choose the Lakehouse#
Groundzero offers four ways to run your data work. Pick the one that matches the shape of the task.
| Lakehouse | Spark | DuckDB | Standard | |
|---|---|---|---|---|
| What you write | SQL in the Lakehouse editor | PySpark and SQL in jobs and notebooks | Python and SQL in jobs and notebooks | One SQL query on a dataset |
| Engine | Spark SQL 4.0 with Iceberg 1.10 | Apache Spark cluster | In-process DuckDB | Managed query engine |
| Where it runs | Your session, driver plus autoscaled workers | Cluster per run | One machine | Shared service |
| Start | Start a session, then run many queries | Cluster start per run | Quick start, then kept warm | No session |
| Tables | Create, alter and drop Iceberg tables | Read and write through connections | Read only | Read only |
| Schedules and pipelines | Backups only; queries are interactive | Jobs and schedules | Jobs and schedules | Datasets and dashboards |
| Governance | Policies, masks and table access built in | Applied as the caller | Applied as the caller | Applied as the caller |
| Best for | Exploring, modelling and maintaining Iceberg tables with SQL | Large or write-heavy ETL | Fast single-node analytics | Charts, dashboards and quick lookups |
Choose the Lakehouse when:
- you want to create, change and look after Iceberg tables with SQL;
- you explore data interactively and want results, paging and exports in a SQL editor;
- you need
MERGE, partition and schema changes, time travel or table maintenance; - you administer access: data policies, column masks and table access rules are edited on the same page.
Choose another runtime when:
- the work has to run on a schedule or inside a pipeline: use a Spark or DuckDB job, which can read and write lakehouse tables;
- you need Python libraries, machine learning or files that are not tables: use Spark or DuckDB;
- a dashboard or API only needs rows from one query: a Standard dataset on a Groundzero lakehouse connection does that without a session.
How a query runs#
- You press Run. The whole editor tab is sent to your session.
- Groundzero checks your permission for every table and database the statement touches, and applies the data policies that protect those tables.
- The engine runs the statement. If it finishes within about 55 seconds, the first page of rows comes back immediately.
- Otherwise the query keeps running in your session and the Messages tab reads "Still running. Results load here when the query finishes." The page shows the result as soon as it is ready.
- The first 100,000 rows of a result are kept in the session so you can page through them quickly. Larger results are prepared as files in your warehouse bucket when you page past them or export.
- The statement is written to the audit log with its status and duration.
Versions#
| Component | Version |
|---|---|
| Apache Spark (SQL engine) | 4.0.0 |
| Apache Iceberg | 1.10.0 |
| Java | 17 |
| Table data files | Parquet |
| Spark SQL mode | ANSI SQL mode on, as in Spark 4.0 |
ANSI mode matters for everyday SQL: an invalid cast or a division by zero
raises an error instead of returning NULL. The functions try_cast,
try_divide and nullif are the safe alternatives (see the SQL reference).