Skip to main content
How-to guideApplies to: Unified engine deployments
Use SQL over HTTP to create a private Iceberg table, publish inline rows, and inspect it. Then use the supported maintenance statements for that table.

Before you start

Choose a writable Iceberg catalog and an unused namespace. This example uses http_docs_01; change it everywhere if it already exists. Set the catalog name under Example values before sending the USE statement.

Publish and inspect a private Iceberg table

Send each statement separately in one session. Wait for success before its dependent step. Cleanup is explicit. Replace the placeholders in your client. Keep returned IDs for later requests. Paths below use the native API prefix; adjust it for your deployment.

1. Open a session

From the response, keep session_id from /session_id. Endpoint reference.

2. Choose the writable catalog

Endpoint reference.

3. Follow: Choose the writable catalog

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

4. Create the private namespace

Endpoint reference.

5. Follow: Create the private namespace

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

6. Create a format-v2 table

Endpoint reference.

7. Follow: Create a format-v2 table

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

8. Publish category totals

Endpoint reference.

9. Follow: Publish category totals

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

10. Read published totals

Endpoint reference.

11. Follow: Read published totals

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

12. Read: Read published totals

Endpoint reference.

13. Compact eligible files

Endpoint reference.

14. Follow: Compact eligible files

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

15. Read: Compact eligible files

Endpoint reference.

16. Verify totals after maintenance

Endpoint reference.

17. Follow: Verify totals after maintenance

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

18. Read: Verify totals after maintenance

Endpoint reference.

19. Clean up the practice table

Endpoint reference.

20. Follow: Clean up the practice table

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

21. Clean up the empty namespace

Endpoint reference.

22. Follow: Clean up the empty namespace

Repeat this read until /status reaches a terminal state: Succeeded, Failed, Cancelled, OutcomeUnknown, Skipped. Endpoint reference.

23. Close the session

Endpoint reference. Expect three category rows with totals Books 60, Games 45, and Garden 35. Inspect execution and commit evidence, then read the destination through the SELECT step.

Maintain the output

Use Maintenance for the exact supported statement and parameters. Submit each statement through a separate operation in the same session. Follow execution before assuming a table rewrite committed. A successful request is not a transaction across the entire example. One small write can leave no eligible files to compact; a no-op maintenance result is valid. The final check should still show three categories and sales of 140.

Clean up

After execution finishes, use the example’s explicit DROP steps for only the private table and namespace created here. Cleanup is never automatic. Close the session at the end. Keep the table instead if you intend to inspect its metadata or run maintenance exercises.
Last modified on November 4, 2026