gabeiglio commented on code in PR #3414:
URL: https://github.com/apache/iceberg-python/pull/3414#discussion_r3303351558


##########
mkdocs/docs/api.md:
##########
@@ -1527,17 +1527,40 @@ def cleanup_old_snapshots(table_name: str, 
snapshot_ids: list[int]):
 cleanup_old_snapshots("analytics.user_events", [12345, 67890, 11111])
 ```
 
-## Views
+## Create a view
 
-PyIceberg supports view operations.
-
-### Check if a view exists
+To create a view from a catalog:
 
 ```python
+import time
+import pyarrow as pa
 from pyiceberg.catalog import load_catalog
+from pyiceberg.view import SQLViewRepresentation, ViewVersion
 
 catalog = load_catalog("default")
-catalog.view_exists("default.bar")
+
+identifier = "default.some_view"
+schema = pa.schema([pa.field("some_col", pa.int32())])
+view_version = ViewVersion(
+    version_id=1,
+    schema_id=1,
+    timestamp_ms=int(time.time() * 1000),
+    summary={},

Review Comment:
   Just to show what the summary is usually used for 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to