MonkeyCanCode commented on code in PR #3414:
URL: https://github.com/apache/iceberg-python/pull/3414#discussion_r3307877883
##########
mkdocs/docs/api.md:
##########
@@ -1527,17 +1527,72 @@ 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.
+If the REST server does not indicate support for view endpoints, you can
enable it by setting `"view-endpoints-supported": "true"`:
-### Check if a view exists
+```python
+from pyiceberg.catalog import load_catalog
+
+catalog = load_catalog(
+ "docs",
+ **{
+ "uri": "http://127.0.0.1:8181",
+ "s3.endpoint": "http://127.0.0.1:9000",
+ "py-io-impl": "pyiceberg.io.pyarrow.PyArrowFileIO",
+ "s3.access-key-id": "admin",
+ "s3.secret-access-key": "password",
+ "view-endpoints-supported": "true",
Review Comment:
So the create/load/check tables are all H2. Thus, I proceeded with the same
for views. I like the idea of keeping `## Views`, however, I am not sure if we
should make the rest H3 as they will be a bit off compare to the table ones.
WDYT?
--
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]