Delete and verify Iceberg rows

Iceberg documentation index: Iceberg Documentation Overview.

Complete the SQL cleanup in the basic Iceberg orders tutorial. Then press Ctrl+C in the terminal running mo-service and wait for it to exit. The independent E2E starts its own MatrixOne instance and first checks that ports including 6001 and 7001 are free. make dev-down-iceberg-tier-a alone does not stop the manually launched mo-service.

From the MatrixOne source repository, stop the basic tutorial’s Compose services and run the independent test:

make dev-down-iceberg-tier-a
make test-iceberg-e2e-local

If you used the local brew services for the basic tutorial, run make dev-down-iceberg-tier-a-brew before the test instead. The independent E2E still requires Docker Compose.

The test creates a merge_on_read mor_accounts table in real Nessie, MinIO, and MatrixOne, inserts four rows, deletes one, and checks the remaining count and balance. Its case implementation uses these operations. Replace the table name with your already configured merge_on_read external table:

INSERT INTO cookbook_iceberg.mor_accounts VALUES
  (1,100,'ksa'),(2,200,'uae'),(3,300,'ksa'),(4,300,'qat');
DELETE FROM cookbook_iceberg.mor_accounts WHERE account_id = 2;
SELECT COUNT(*) AS remaining, SUM(balance) AS balance_sum
FROM cookbook_iceberg.mor_accounts;
SELECT COUNT(*) AS deleted_rows FROM cookbook_iceberg.mor_accounts
WHERE account_id = 2;

Expect remaining=3, balance_sum=700, and deleted_rows=0. The basic orders tutorial maps an append_only table, so deleting through that mapping is not valid. Clean up by dropping the MatrixOne mapping, unregistering access, dropping the catalog, and stopping local services. Check the remote Iceberg data separately before removing it.