This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 6de1a0b1f1 [#9715] improvement(docs): Add the documents for Ray using 
IRC (#9716)
6de1a0b1f1 is described below

commit 6de1a0b1f1cadf049639da5eb33c878737113ca4
Author: roryqi <[email protected]>
AuthorDate: Mon Jan 19 14:54:20 2026 +0800

    [#9715] improvement(docs): Add the documents for Ray using IRC (#9716)
    
    ### What changes were proposed in this pull request?
    
    Add the documents for Ray using IRC
    
    ### Why are the changes needed?
    
    Fix: #9715
    
    ### Does this PR introduce _any_ user-facing change?
    
    Just documents.
    
    ### How was this patch tested?
    
    No.
---
 docs/iceberg-rest-service.md | 52 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/docs/iceberg-rest-service.md b/docs/iceberg-rest-service.md
index 308fcf357f..67b8cd1bbc 100644
--- a/docs/iceberg-rest-service.md
+++ b/docs/iceberg-rest-service.md
@@ -695,6 +695,58 @@ table = catalog.load_table(table_identifier)
 print(table.scan().to_arrow())
 ```
 
+### Exploring Apache Iceberg with Ray
+
+[Ray](https://www.ray.io/) is a unified framework for scaling AI and Python 
applications. Ray Data provides native support for reading and writing Iceberg 
tables through the REST catalog.
+
+:::note
+Ray Data only supports reading from and writing to existing Iceberg tables. It 
does not support DDL operations such as creating, dropping, or altering tables, 
schemas, or catalogs. You need to use other tools like Spark or PyIceberg to 
manage table metadata.
+:::
+
+#### Writing to Iceberg tables with Ray
+
+```python
+import ray
+import pandas as pd
+
+docs = [{"id": i, "data": f"Doc {i}"} for i in range(4)]
+ds = ray.data.from_pandas(pd.DataFrame(docs))
+ds.write_iceberg(
+    table_identifier="default.sample",
+    catalog_kwargs={
+        "name": "default",
+        "type": "rest",
+        "uri": "http://localhost:9001/iceberg/";,
+        "header.X-Iceberg-Access-Delegation": "vended-credentials",
+        "auth": {
+            "type": "basic",
+            "basic": {"username": "manager", "password": "mock"}
+        }
+    }
+)
+```
+
+#### Reading Iceberg tables with Ray
+
+```python
+import ray
+
+ds = ray.data.read_iceberg(
+    table_identifier="default.sample",
+    catalog_kwargs={
+        "name": "default",
+        "type": "rest",
+        "uri": "http://localhost:9001/iceberg/";,
+        "header.X-Iceberg-Access-Delegation": "vended-credentials",
+        "auth": {
+            "type": "basic",
+            "basic": {"username": "manager", "password": "mock"}
+        }
+    }
+)
+ds.show(limit=1)
+```
+
 ## Docker instructions
 
 You could run Gravitino Iceberg REST server through docker container:

Reply via email to